Skip to content
Snippets Groups Projects
Commit f9eb5ab9 authored by Hinrikus Wolf's avatar Hinrikus Wolf Committed by Robin Sonnabend
Browse files

update alumnigraphi system

parent 9b68f445
No related branches found
No related tags found
1 merge request!40update alumnigraphi system
...@@ -93,8 +93,13 @@ ...@@ -93,8 +93,13 @@
- name: restart uwsgi instance vampir-mitglieder - name: restart uwsgi instance vampir-mitglieder
service: name="uwsgi@vampir-mitglieder" state=restarted service: name="uwsgi@vampir-mitglieder" state=restarted
- name: restart uwsgi instance alumnigraph - name: restart uwsgi instance alumnigraph uwsgi
service: name="uwsgi@alumnigraph" state=restarted service: name="uwsgi@alumnigraph" state=restarted
listen: "restart uwsgi instance alumnigraph"
- name: restart uwsgi instance alumnigraph celery
service: name="alumnigraph-celery" state=restarted
listen: "restart uwsgi instance alumnigraph"
- name: restart uwsgi instance ak-tracker - name: restart uwsgi instance ak-tracker
service: name="uwsgi@ak-tracker" state=restarted service: name="uwsgi@ak-tracker" state=restarted
......
...@@ -19,6 +19,25 @@ ...@@ -19,6 +19,25 @@
notify: notify:
- "restart uwsgi instance {{app.instance}}" - "restart uwsgi instance {{app.instance}}"
- name: ensure the celery unit file exists
template:
src: apps/alumnigraph-celery.service.j2
dest: "/etc/systemd/system/{{ app_name }}-celery.service"
owner: root
group: root
mode: '0644'
notify:
- reload systemd service files
- "restart uwsgi instance {{app.instance}}"
- meta: flush_handlers
- name: ensure the celery service is enabled
service:
name: "{{app_name}}-celery"
enabled: true
state: started
- name: ensure the folder from above is not present anymore - name: ensure the folder from above is not present anymore
file: file:
path: "{{app_path}}/.ansible" path: "{{app_path}}/.ansible"
......
[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_venv }}/bin/celery -A server.celery worker --loglevel=DEBUG --concurrency={{ alumni_graph_celery_concurrency }}
Restart=always
[Install]
WantedBy=multi-user.target
...@@ -23,3 +23,4 @@ SEND_INVITATIONS = {{ alumni_graph_send_invitation }} ...@@ -23,3 +23,4 @@ SEND_INVITATIONS = {{ alumni_graph_send_invitation }}
SENTRY_URL = "{{ alumni_graph_sentry_url }}" SENTRY_URL = "{{ alumni_graph_sentry_url }}"
BABEL_DEFAULT_LOCALE = "DE" BABEL_DEFAULT_LOCALE = "DE"
CELERY_BROKER_URL = {{ alumni_graph_celery_broker }}
...@@ -47,3 +47,6 @@ alumni_graph_sentry_url: "" ...@@ -47,3 +47,6 @@ alumni_graph_sentry_url: ""
# Do not define if there is no authentication needed # Do not define if there is no authentication needed
# alumni_graph_mail_user: None # alumni_graph_mail_user: None
# alumni_graph_mail_pass: None # alumni_graph_mail_pass: None
#
alumni_graph_celery_broker: '"redis://localhost:6379/2"'
alumni_graph_celery_concurrency: 2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment