From c3366e48e8a80ec5544a284fe4dd8b2d4e3da0b3 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 4 Aug 2020 23:12:03 +0530 Subject: [PATCH] added graceful exit --- app/dock_docker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/dock_docker.py b/app/dock_docker.py index 8a9a4fb..78f74e1 100644 --- a/app/dock_docker.py +++ b/app/dock_docker.py @@ -7,6 +7,10 @@ sql_select_Query = "select * from curieweb where done=0 LIMIT 1" mycursor.execute(sql_select_Query) records = mycursor.fetchall() +if records == []: + print("Empty Set 😳") + print("No active task, exitting gracefully") + exit(0) def email(zipArchive): import smtplib