Skip to content

Commit

Permalink
nice output on keyboard interrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
aheadley committed Feb 22, 2012
1 parent 4d332e1 commit 3c1fd55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions worker.py
Expand Up @@ -215,5 +215,8 @@ def build(worker, job):
except gearman.errors.ServerUnavailable:
logger.warning('Server disconnected. Trying again')
time.sleep(1)
except KeyboardInterrupt:
logger.info('Exiting...')
break

sys.exit(0)

0 comments on commit 3c1fd55

Please sign in to comment.