Closed booqoffsky closed 1 year ago
It seems to use loop.create_task(callback(redis_message)) in the main worker cycle can lead to an undesirable state (the number of tasks in the worker can increase indefinitely).
loop.create_task(callback(redis_message))
Maybe it's better to change this mechanism? Correct me if I'm wrong
I guess you're right. We can change broker API, so brokers won't control how much tasks they will be executing.
My suggestion here is to turn the listen method to async generator. So it would yield new tasks.
listen
It seems to use
loop.create_task(callback(redis_message))
in the main worker cycle can lead to an undesirable state (the number of tasks in the worker can increase indefinitely).Maybe it's better to change this mechanism? Correct me if I'm wrong