This commit is contained in:
Ask Solem 2010-11-30 19:58:04 +01:00
parent 0e44a16230
commit aa5ee5c436
2 changed files with 2 additions and 2 deletions

View File

@ -15,6 +15,7 @@ queue = Queue("kombu_demo", exchange, routing_key="kombu_demo")
def pretty(obj):
return pformat(obj, indent=4)
#: This is the callback applied when a message is received.
def handle_message(body, message):
print("Received message: %r" % (body, ))
@ -42,5 +43,3 @@ consumer.consume()
#: be a message, or a message that is to be delivered to the consumers
#: channel, but any event received on the connection.
connection.drain_events()

View File

@ -115,6 +115,7 @@ class BlockingConnection(blocking_adapter.BlockingConnection):
def ensure_drain_events(self, timeout=None):
return self.drain_events(timeout=timeout)
class AsyncoreConnection(asyncore_adapter.AsyncoreConnection):
_event_counter = 0
Super = asyncore_adapter.AsyncoreConnection