Improve example code

This commit is contained in:
Ask Solem 2011-09-12 12:57:12 +01:00
parent 5f267314bf
commit aceaa71956
1 changed files with 4 additions and 1 deletions

View File

@ -32,4 +32,7 @@ if __name__ == "__main__":
setup_logging(loglevel="INFO")
with BrokerConnection("amqp://guest:guest@localhost:5672//") as conn:
Worker(conn).run()
try:
Worker(conn).run()
except KeyboardInterrupt:
print("bye bye")