I have a wrapper script that starts a worker, but I don't understand how to limit the amount of concurrency. I tried to read the celery code, but for me it's very hard to see how they do it.
My code:
from celery.bin import worker as w
my_worker = w.worker(app=app )
options = {
'loglevel': loglevel,
'queues': [service,],
'hostname': hostname,
}
my_worker.run(**options)
I don't really know how to add the concurrency to this.