From 1179f4d14049cde11a687f39c68a113621879496 Mon Sep 17 00:00:00 2001 From: David Trattnig <david.trattnig@o94.at> Date: Mon, 23 Nov 2020 22:21:47 +0100 Subject: [PATCH] Proper graceful shutdown. --- src/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 65d664e..18e3042 100644 --- a/src/app.py +++ b/src/app.py @@ -82,7 +82,8 @@ def shutdown(): """ Called when the application shuts down. """ - sync_job.exit() + if sync_job: + sync_job.exit() with app.app_context(): -- GitLab