Skip to content

Commit

Permalink
Make PD handle ctrl-c better
Browse files Browse the repository at this point in the history
  • Loading branch information
oldpatricka committed Mar 23, 2012
1 parent 841f2e7 commit c8c5f6d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion epu/dashiproc/processdispatcher.py
Expand Up @@ -53,7 +53,12 @@ def start(self):
self.matchmaker.initialize()
self.matchmaker_thread = gevent.spawn(self.matchmaker.run)

self.dashi.consume()
try:
self.dashi.consume()
except KeyboardInterrupt:
log.warning("Caught terminate signal. Bye!")
else:
log.info("Exiting normally. Bye!")

def stop(self):
self.dashi.cancel()
Expand Down

0 comments on commit c8c5f6d

Please sign in to comment.