Skip to content

Commit

Permalink
fix: rename key
Browse files Browse the repository at this point in the history
  • Loading branch information
fproldan committed Sep 14, 2021
1 parent 58ef0ac commit 75f8462
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bench/config/supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def generate_supervisor_config(bench_path, user=None, yes=False, skip_redis=Fals
"background_workers": config.get('background_workers') or 1,
"bench_cmd": which('bench'),
"skip_redis": skip_redis,
"custom_queues": config.get("custom_queues", {}),
"workers": config.get("workers", {}),
})

conf_path = os.path.join(bench_path, 'config', 'supervisor.conf')
Expand Down
10 changes: 5 additions & 5 deletions bench/config/templates/supervisor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ killasgroup=true
numprocs={{ background_workers }}
process_name=%(program_name)s-%(process_num)d

{% for queue_name, queue_details in custom_queues.items() %}
[program:{{ bench_name }}-frappe-{{ queue_name }}-worker]
command={{ bench_cmd }} worker --queue {{ queue_name }}
{% for worker_name, worker_details in workers.items() %}
[program:{{ bench_name }}-frappe-{{ worker_name }}-worker]
command={{ bench_cmd }} worker --queue {{ worker_name }}
priority=4
autostart=true
autorestart=true
stdout_logfile={{ bench_dir }}/logs/worker.log
stderr_logfile={{ bench_dir }}/logs/worker.error.log
user={{ user }}
stopwaitsecs={{ queue_details["timeout"] }}
stopwaitsecs={{ worker_details["timeout"] }}
directory={{ bench_dir }}
killasgroup=true
numprocs={{ queue_details["workers"] or background_workers }}
numprocs={{ worker_details["background_workers"] or background_workers }}
process_name=%(program_name)s-%(process_num)d
{% endfor %}

Expand Down

0 comments on commit 75f8462

Please sign in to comment.