#!/bin/bash
# This script is used to restart the celery workers
# Automatically generated by acoupi, DO NOT EDIT THIS FILE
# Date: {{ now }}

{{ celery_bin }} \
    -A {{ app_name }} \
    multi \
    restart \
{%- for worker in config.workers %}
    {{ worker.name }} \
{%- if worker.queues %}
    -Q:{{ worker.name }} {{ worker.queues|join(",") }} \
{%- endif %}
{%- if worker.concurrency %}
    -c:{{ worker.name }} {{ worker.concurrency }} \
{%- endif %}
{%- endfor %}
    --pool={{ pool_type }} \
    --loglevel={{ log_level }} \
    --pidfile={{ run_dir }}/%n.pid \
    --logfile={{ log_dir }}/%n%I.log
