Force the Celery workers to run only one task at a time

This forces the tasks to be run serially.
This commit is contained in:
mprahl
2019-12-09 08:46:06 -05:00
parent 884d7fb79c
commit fd93c8f436
2 changed files with 9 additions and 0 deletions

View File

@@ -55,6 +55,8 @@ celery_configs = {
name[7:]: getattr(conf, name)
for name in dir(conf) if name.startswith("celery_")
}
# Only allow a single process so that tasks are always serial per worker
celery_configs["worker_concurrency"] = 1
celery_app.conf.update(**celery_configs)