Created
March 10, 2016 13:15
-
-
Save curtisforrester/9e087cc2b993d2bb91eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exchange = Exchange(CONSUMER_EXCHANGE, type='direct') | |
lookout_queue = Queue('lookout_rep', exchange, CONSUMER_QUEUE_ROUTING_KEY) | |
class LookoutConsumerStep(bootsteps.ConsumerStep): | |
def get_consumers(self, channel): | |
return [Consumer(channel, queues=[lookout_queue], callbacks=[self.handle_message], accept=['json'])] | |
def handle_message(self, body, message): | |
from DNotify.logic.replication import handle_replication_message | |
handle_replication_message(message=body) | |
message.ack() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment