sub-muxer
sub-muxer copied to clipboard
Implement a Queue System
A queue system is required to process the muxing commands in queue for Avoiding system memory overflow.
Could you provide some more details?
Could you provide some more details?
Since muxing is resource greedy process all the request by the users should be first entered in a queue and then the process should be executed in order one at a time.. This will also prevent memory overflow problem on heroku when multiple users send requests at same time!
I have looked into the codebase. Based on my understanding there are 2 types of muxing that bot is doing. It would become a bit problematic since the function calls are directly on user input.
Therefore, I plan to create use decorator to pass whole muxing function into a task queue. Will the approach be fine considering that i don't have prior understanding of how you are muxing?
Suggestions would be appreciated.
Yeah.. i think we would have to do with decorators if we don't want to Rewrite a big part of the code..
Will the approach be fine considering that i don't have prior understanding of how you are muxing?
I didn't got you here... When the user commands for muxing, file is fetched from database and muxed using ffmpeg through a subprocess call (the code as is here)
What i initially had in mind to put all request in the queue and later run the queue. But yeah that would mean a major Rewrite.. so your idea seems viable
Great, This was the information required to go through the process. Thanks I will PR asap.