Add background_import param to import_records() #310
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Setting this to True will ask REDCap to import records in the background; this will work similarly to the background import in the Data Import Tool.
Because this flag is not supported in old REDCap versions, if you do not specify it, it will not be added to your request parameters at all and you will get the default REDCap behavior.
Currently, REDCap defaults to foreground imports.
The response from a background import will look like:
{'success': True}. There is no explicit way to monitor a background import; the best idea I have so far is to include a sentinel value at the end of your records and poll for that value.Closes #307