From 4d94b8a0a80289eec24f3d168e0684abb94c186a Mon Sep 17 00:00:00 2001 From: Wim Pomp Date: Tue, 30 Aug 2022 13:37:50 +0200 Subject: [PATCH] Change how gunicorn runs this. --- matlab.service | 2 +- matlabhub/wsgi.py | 3 --- setup.py | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 matlabhub/wsgi.py diff --git a/matlab.service b/matlab.service index fc02af1..5889671 100644 --- a/matlab.service +++ b/matlab.service @@ -6,7 +6,7 @@ Wants=network-online.target [Service] User=matlab-user Type=simple -ExecStart=/usr/local/bin/gunicorn --bind unix:/tmp/matlabhub.sock matlabhub.wsgi:application +ExecStart=/usr/local/bin/gunicorn --bind unix:/tmp/matlabhub.sock matlabhub.app:app ExecStop=/bin/kill -s STOP $MAINPID ExecReload=/bin/kill -s HUP $MAINPID TimeoutSec=0 diff --git a/matlabhub/wsgi.py b/matlabhub/wsgi.py deleted file mode 100644 index 323b90a..0000000 --- a/matlabhub/wsgi.py +++ /dev/null @@ -1,3 +0,0 @@ -import os -import sys -from matlabhub.app import app as application diff --git a/setup.py b/setup.py index 1852f2d..e9a67e6 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setuptools.setup( 'Operating System :: OS Independent', ], python_requires='>=3.8', - install_requires=['matlab-proxy', 'flask'], + install_requires=['matlab-proxy', 'flask', 'gunicorn', 'pyyaml'], entry_points={'console_scripts': ['matlabhub=matlabhub:main'], }, package_data={'': ['templates/*', 'config.yml']}, include_package_data=True,