Permalink
Browse files

nice output on keyboard interrupt

  • Loading branch information...
1 parent 4d332e1 commit 3c1fd5559be53ab0d25d6387603768592a60f645 @aheadley committed Feb 22, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 worker.py
View
@@ -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.