From 4036030f8415142f3763e765ff4fe13e6ea6e174 Mon Sep 17 00:00:00 2001
From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de>
Date: Wed, 11 Jul 2018 00:51:10 +0200
Subject: [PATCH] Add forgotten celery service template again

---
 uwsgi-python/tasks/apps/protokollsystem.yml        |  2 +-
 .../apps/protokollsystem-celery.service.j2         | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 uwsgi-python/templates/apps/protokollsystem-celery.service.j2

diff --git a/uwsgi-python/tasks/apps/protokollsystem.yml b/uwsgi-python/tasks/apps/protokollsystem.yml
index ec66162..fe394ef 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 0000000..ad5b308
--- /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
-- 
GitLab