Open KyleMaas opened 6 months ago
So it looks like if the encoding is created by a chunkize_media
task, priority on anything in settings.MINIMUM_RESOLUTIONS_TO_ENCODE
is made to run with the same highest priority.
Otherwise if it's created by encode
and if it needs to be chunkized and is encoding a GIF, then the priority is set to the highest priority (0). Or for anything other than GIFs, the priority is set backwards from in tasks.py
- the more important resolutions are set to the lowest priority (9).
So it's correct or backward depending on which code path it takes. But it is at least partially implemented. It just needs to be cleaned up so stuff happens in the right order.
Oh, and the 0==highest and 9==lowest priority thing seems to be due to using the Redis backend for Celery. Otherwise it's the other way around, and the documentation flip flops a bit on this. But that seems to be the way it is currently.
Describe the feature you'd like When uploading a lot of massive files at once, they seem to be processed in order. So once the first video uploads and it is chunked, Celery is then saturated with tasks. When the second video uploads, it now has to wait until all of the encodings of the first one finish processing before the preview and low-res encodings of the second video are processed. It would be nice if you could set encoding priorities so you could have all new videos processed for preview and for 240P MP4 before proceeding on to the higher resolution encodings.
Describe alternatives you've considered N/A
Additional context N/A