Support for reprocessing trials with missing videos #171
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.
This PR adds support for reprocessing trials that do not have all videos uploaded. There are two ways this can happen: 1) the camera disconnected before hitting start recording. In that case, you have only 2 videos in db. 2) the camera disconnected while the trial was being recorded or during upload. In that case, you cancel upload (or it times out) and you have an entry in the db with video: null. In both cases, the trials are error-ed, but using different mechanisms.
In this PR, I adjusted a flag passed to main
camerastouse
that is['all']
by default, but that can now be set to['all_available']
. When that's the case, then a trial can be processed, even if not all videos are available. To be able to reprocess trials on server using that flag, I added the possibility to add that variable to the metadata. Also, I removed a check in app.py that was checking if all video entries actually had a video file. This is now implemented in main. This allows a trial with missing videos to "pass app.py". Note that a trial that has missing videos is not dequeued directly, but after 15 minutes, which is fine.All is all, it should not change anything to current user experience: A trial with missing videos will be error-ed out. However, if you add the variable to the metadata and kick back the trials to the server, then they will be processed. I tested and it is working all fine. You also see in the main_settings yaml which cameras were used.