This file contains hidden or 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 | |
This file contains hidden or 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
| @api_view(['GET', 'PUT', 'DELETE', 'HEAD']) | |
| @spy(persist=SPY_PERSIST, log=False, replicate=SPY_REPLICATE, category='site_updates') | |
| def site_detail(request, customer_num): | |
| pass |
This file contains hidden or 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
| '.source.python': | |
| 'Class method': | |
| 'prefix': 'defs' | |
| 'body': """ | |
| def ${1:foo}(self$2): | |
| \\"\\"\\" $3 | |
| :unit_test: | |
| \\"\\"\\" | |
| """ |
This file contains hidden or 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
| import Foundation | |
| extension String | |
| { | |
| var length: Int { | |
| get { | |
| return count(self) | |
| } | |
| } | |
NewerOlder