diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2020-08-04 23:12:03 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2020-08-04 23:12:03 +0530 |
commit | c3366e48e8a80ec5544a284fe4dd8b2d4e3da0b3 (patch) | |
tree | d6c6bf0e8d91df5b243f43573b1d5e7dd7e34cae /app | |
parent | 3340d0f9f27d17e36f028821b73af58fe79e3329 (diff) |
added graceful exit
Diffstat (limited to 'app')
-rw-r--r-- | app/dock_docker.py | 4 |
1 files changed, 4 insertions, 0 deletions
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 |