[Unit]
Description=MBS worker %I
After=network.target{{ ' rabbitmq-server.service' if mbs_systemd_wait_for_rabbitmq else '' }}

[Service]
Type=simple
# Always restart the service, even if it exits cleanly
Restart=always
RestartSec=1
User=fedmsg
ExecStart=/usr/bin/celery worker -n mbs-worker-%I -Q mbs-default,mbs-%I -A module_build_service.scheduler.celery_app --loglevel=info --max-tasks-per-child={{ mbs_celery_max_worker_tasks }}

[Install]
WantedBy=multi-user.target
