[geany/www.geany.org] 7c4074: Perform full restart of the uwsgi process on deployment

Enrico Tröger git-noreply at xxxxx
Sun Jun 7 22:18:47 UTC 2020


Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   Enrico Tröger <enrico.troeger at uvena.de>
Date:        Sun, 07 Jun 2020 22:18:47 UTC
Commit:      7c4074668bf68ccdc81263b79912e1b4c342af51
             https://github.com/geany/www.geany.org/commit/7c4074668bf68ccdc81263b79912e1b4c342af51

Log Message:
-----------
Perform full restart of the uwsgi process on deployment

This can lead to a very short downtime but is more reliable to get
all code changes into production.


Modified Paths:
--------------
    fabfile.py

Modified: fabfile.py
7 lines changed, 3 insertions(+), 4 deletions(-)
===================================================================
@@ -20,10 +20,9 @@
 DJANGO_HOME = '/srv/django'
 PROJECT_DIRECTORY = join(DJANGO_HOME, 'www.geany.org')
 PROJECT_VENV_BIN = join(PROJECT_DIRECTORY, 'venv/bin')
-UWSGI_COMMAND = join(PROJECT_VENV_BIN, 'uwsgi')
-UWSGI_MASTER_FIFO = join(DJANGO_HOME, 'run/www.geany.org.fifo')
 PYTHON_COMMAND = join(PROJECT_VENV_BIN, 'python')
 MANAGE_PY = join(PROJECT_DIRECTORY, 'manage.py')
+SYSTEMD_SERVICE_NAME = 'geany.org.service'
 SUDO_USER = 'django'
 REMOTE_HOST = ['geany.org']
 
@@ -74,5 +73,5 @@ def deploy(connection):
     # clear the cache
     _sudo_django_manage_command(connection, 'clear_cache')
 
-    # trigger UWSGI chain reload
-    _sudo_in_project_directory(connection, 'echo c > {}'.format(UWSGI_MASTER_FIFO))
+    # restart UWSGI process
+    _sudo_in_project_directory(connection, 'systemctl restart {}'.format(SYSTEMD_SERVICE_NAME))



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list