Think through how to handle failures
waldoj opened this issue · 1 comments
If we pull a video out of SQS, it's no longer in the queue—the only record of its need is within the currently-running process. So if one of the many components fail, that's the end of that video.
The only way to revisit it is if we modify Machine's RSS poller, to compare available videos against those it has logged to SQS against those present in the database, to allow for re-queueing. But that is not how it works now.
Another mechanism could be to modify the finish()
function in handler.sh
, so that in the case of failure (not exiting, but actual failure), the video is re-added to SQS. But I worry that just leads to an infinite loop of video re-processing.
So this doesn't solve the problem entirely—we can still wind up with an infinite-loop scenario—but that's ultimately unlikely.