chg: Better messages if website does not start

pull/172/head
Raphaël Vinot 2021-02-21 23:40:29 +01:00
parent 9091970ef4
commit 3ec8015e14
1 changed files with 5 additions and 1 deletions

View File

@ -23,7 +23,11 @@ def main():
cwd=website_dir) cwd=website_dir)
set_running('website') set_running('website')
while True: while True:
if shutdown_requested() or p.poll() is not None: if p.poll() is not None:
print('gunicorn stopped itself.')
break
if shutdown_requested():
print('"shutdown" key present in the cache database.')
break break
time.sleep(1) time.sleep(1)
except KeyboardInterrupt: except KeyboardInterrupt: