diff --git a/uwsgi-python/tasks/apps/protokollsystem.yml b/uwsgi-python/tasks/apps/protokollsystem.yml index ec6616225eb40162267959e2791513d1a4ddca63..fe394effd9bac982ca9fd933930c9a6d5a618625 100644 --- a/uwsgi-python/tasks/apps/protokollsystem.yml +++ b/uwsgi-python/tasks/apps/protokollsystem.yml @@ -41,7 +41,7 @@ - name: ensure the celery unit file exists template: - src: celery.service.j2 + src: apps/protokollsystem-celery.service.j2 dest: "/etc/systemd/system/{{ app_name }}-celery.service" owner: root group: root diff --git a/uwsgi-python/templates/apps/protokollsystem-celery.service.j2 b/uwsgi-python/templates/apps/protokollsystem-celery.service.j2 new file mode 100644 index 0000000000000000000000000000000000000000..ad5b30878559674d0b0526c705870ddfa7c58b9c --- /dev/null +++ b/uwsgi-python/templates/apps/protokollsystem-celery.service.j2 @@ -0,0 +1,14 @@ +[Unit] +Description={{ app_name }}-Celery +After=network.target + +[Service] +User={{ app_user }} +Group={{ app_group }} +WorkingDirectory={{ app_path }} +Environment=VIRTUAL_ENV="{{ app_path }}" +ExecStart={{ app_path }}/bin/celery -A server.celery worker --loglevel=DEBUG --concurrency={{ protokolle_celery_concurrency }} +Restart=always + +[Install] +WantedBy=multi-user.target