~crocmagnon/blog

3ce547596cb4d363690dd101c3a93877b1251dcc — Gabriel Augendre 14 days ago 3ad58df packaging
Check for errors in gunicorn process
1 files changed, 3 insertions(+), 1 deletions(-)

M articles/management/commands/serve.py
M articles/management/commands/serve.py => articles/management/commands/serve.py +3 -1
@@ 11,6 11,8 @@ class Command(BaseCommand):

    def run_from_argv(self, argv):
        try:
            subprocess.run(["gunicorn", *argv[2:]])
            subprocess.run(["gunicorn", *argv[2:]], check=True)
        except KeyboardInterrupt:
            logger.warning("Interrupted")
        except subprocess.CalledProcessError as e:
            logger.error("Error during subprocess. Return code: %s", e.returncode)