-
Notifications
You must be signed in to change notification settings - Fork 19
Description
TL; DR
The video download all task can be very resource intensive, and we allow two jobs to run in parallel. We should prevent a video-download-all task from running while this task is still in progress for the same study.
Description
The video download all task can be very time/resource intensive, and researchers might click the 'download all' button again before the first job is finished. Also, although we have recently improved the video-download-all task to make it use less memory, our system is still sensitive to the CPU load from zipping a large amount of video data. We recently had a site outage due to this task running twice (in parallel) for the same study, which had a large amount of video data. We can reduce the chances of two simultaneous large jobs by preventing the task from starting again while another job is still in progress for that same study.
Implementation
On the responses -> videos page, we should be able to check celery's active/queued jobs to see if there's a video download all task for that particular study, and if so, disable the 'download all' button (perhaps with a message saying that this job is already in progress/queued).