summaryrefslogtreecommitdiff
path: root/examples/simple_task_queue
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2011-09-12 12:57:12 +0100
committerAsk Solem <ask@celeryproject.org>2011-09-12 12:57:12 +0100
commitaceaa7195690c0500e18f7fc95fee105fa1f2ecc (patch)
tree7aa388f688e77e1b8ceef56343a7c4910aeb67c3 /examples/simple_task_queue
parent5f267314bf6ca14dba84bccf00d66d624a399aaa (diff)
downloadkombu-aceaa7195690c0500e18f7fc95fee105fa1f2ecc.tar.gz
Improve example code
Diffstat (limited to 'examples/simple_task_queue')
-rw-r--r--examples/simple_task_queue/worker.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/simple_task_queue/worker.py b/examples/simple_task_queue/worker.py
index 0fa4c261..8b521a43 100644
--- a/examples/simple_task_queue/worker.py
+++ b/examples/simple_task_queue/worker.py
@@ -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")