-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task routing #35
Comments
in celery, I can start worker with different queue name, so I can send task to specific worker with different queue name. but I can't control Worker.consumers from |
I find a hacking way, I can remove _WorkerMiddleware at here. Line 59 in 2855d1a
and use worker._add_consumer(queue_name) after here. Line 159 in 2855d1a
somethings like
but this is conflict with current queue_name check. Line 55 in 620f460
|
Yep, something like that ought to work. This use case isn't supported right now, but it's something I can add in the future. Can you tell me more about your exact use case here, @Timaqf? Would actor priorities not be a good fit? |
@Bogdanp I want different worker to do different work in same app depends on work's args and kwargs. |
@Bogdanp |
Gotcha. Right now you can use actor priorities for something like that but the disadvantage is priorities are per-actor and workers are homogeneous. I'll add something like your proposed enhancement soon. |
nice man! |
Apologies for the delay, @Timaqf. This is now in master and I'll cut a release tomorrow! |
thanks. like below
so I can start the worker only do if do some changes in https://github.com/Bogdanp/dramatiq/blob/master/dramatiq/__main__.py#L165
I can write the below code to do the same jobs.
the starts like let me known what you think. |
I think I see what you're saying. Unfortunately, the fact that each actor is bound to a single queue is a core part of the design and I don't think that should change. You could achieve what you're currently doing with modifying |
does dramatiq has anything like celery about task routing.
I didn't find any api to send task with queue_name, but I can build message myself to send task to specific queue.
but i can't start worker only consumer for specific queue like celery.
The text was updated successfully, but these errors were encountered: