haojie
haojie

Reputation: 753

How to set the max worker in celery queue?

I use celery4.x with Djangoand have more than two tasks in my celery queue. Due to the limit of GPU, I can only run at most two at the same time. Is there a way to let the third task wait and run until one of the previous two task? I have set CELERYD_CONCURRENCY paremeter in Django's settings.py which seems not work.

Anyone knows? Thanks

Upvotes: 2

Views: 4006

Answers (1)

nenadp
nenadp

Reputation: 816

Run your worker using concurrency argument:

celery -A proj worker -l info --concurrency 2 -Q queue_name

Upvotes: 2

Related Questions