in03 / proxima

Transcode source media directly from DaVinci Resolve using multiple machines for encoding. Great for creating proxies quickly.
MIT License
50 stars 3 forks source link

Add a handler for requeuing jobs #227

Open in03 opened 1 year ago

in03 commented 1 year ago

Currently it's possible to requeue the same job when it's already encoding. It's not likely you'll run into it unless two timelines share the same file or the same timeline is requeued while it's still processing for some reason (maybe found new files or the first attempt exited early or something).

Anyway, the current behaviour is a little weird. I believe Proxima will ask you if you want to link the existing file even though it's not finished. Of course it will fail and you'll be asked if you want to requeue it. This assumes that the file is corrupt and needs re-encoding. Not that the file may already be encoding. We can check all Proxima jobs and see if any share the same source path with ones we'd like to queue.

in03 commented 1 year ago

Looks like it'll be a little complicated to use Celery event snapshots.

Another method would be to watch all existing paths asynchronously in another process while running the other handlers. If any have grown, we remove them from the media list. Adding async this late in the game might be pretty messy though.