diff --git a/bench/config/procfile.py b/bench/config/procfile.py index 50a45560..8a479b2e 100755 --- a/bench/config/procfile.py +++ b/bench/config/procfile.py @@ -23,7 +23,8 @@ def setup_procfile(bench_path, yes=False, skip_redis=False): use_rq=use_rq(bench_path), webserver_port=config.get('webserver_port'), CI=os.environ.get('CI'), - skip_redis=skip_redis) + skip_redis=skip_redis, + workers=config.get("workers", {})) with open(procfile_path, 'w') as f: f.write(procfile) diff --git a/bench/config/templates/Procfile b/bench/config/templates/Procfile index f810506e..d9391087 100644 --- a/bench/config/templates/Procfile +++ b/bench/config/templates/Procfile @@ -14,6 +14,9 @@ schedule: bench schedule worker_short: bench worker --queue short 1>> logs/worker.log 2>> logs/worker.error.log worker_long: bench worker --queue long 1>> logs/worker.log 2>> logs/worker.error.log worker_default: bench worker --queue default 1>> logs/worker.log 2>> logs/worker.error.log +{% for worker_name, worker_details in workers.items() %} +worker_{{ worker_name }}: bench worker --queue {{ worker_name }} 1>> logs/worker.log 2>> logs/worker.error.log +{% endfor %} {% else %} workerbeat: sh -c 'cd sites && exec ../env/bin/python -m frappe.celery_app beat -s scheduler.schedule' worker: sh -c 'cd sites && exec ../env/bin/python -m frappe.celery_app worker -n jobs@%h -Ofair --soft-time-limit 360 --time-limit 390'