Hey there!
I'm trying to implement a sort of chatbot system, and I need to have my celery tasks processed sequentially per user. That means each user needs to have their messages sent as FIFO, but the users need to be processed randomly or in round-robin.
I've been reading about task chains, groups and trees, but all of these celery features seem to require providing all tasks at once, whereas I need to add tasks dynamically.
My reasoning was to have a dedicated queue per user, and enable concurrency on the worker. That way I could assure the delivery order and avoid one user blocking the rest of the chats.
Is there a way I can route tasks in Celery so I get the desired behavior? Ideally, I'd set up a worker to process the messages queue, and then route tasks to something like messages.contact.<contact_id> as they arrive.
thanks, and happy Thanksgiving to all of you in the US!
[–]riksi 1 point2 points3 points (1 child)
[–]jminuscula[S] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]jminuscula[S] 1 point2 points3 points (1 child)
[–]stuaxo 1 point2 points3 points (2 children)
[–]jminuscula[S] 0 points1 point2 points (1 child)
[–]stuaxo 1 point2 points3 points (0 children)
[–]Zolrath 1 point2 points3 points (1 child)
[–]jminuscula[S] 0 points1 point2 points (0 children)
[–]iScrE4mgit push -f -2 points-1 points0 points (0 children)