|
@@ -32,13 +32,16 @@ if __name__ == "__main__":
|
|
|
group_id=config['mq']['receive_group'],
|
|
|
topic_type='FIFO'
|
|
|
)
|
|
|
- send_queue = AliyunRocketMQQueueBackend(
|
|
|
- config['mq']['endpoints'],
|
|
|
- config['mq']['instance_id'],
|
|
|
- config['mq']['send_topic'],
|
|
|
- has_consumer=False, has_producer=True,
|
|
|
- topic_type='FIFO'
|
|
|
- )
|
|
|
+ if configs.get_env() == 'prod':
|
|
|
+ send_queue = AliyunRocketMQQueueBackend(
|
|
|
+ config['mq']['endpoints'],
|
|
|
+ config['mq']['instance_id'],
|
|
|
+ config['mq']['send_topic'],
|
|
|
+ has_consumer=False, has_producer=True,
|
|
|
+ topic_type='FIFO'
|
|
|
+ )
|
|
|
+ else:
|
|
|
+ send_queue = MemoryQueueBackend()
|
|
|
else:
|
|
|
receive_queue = MemoryQueueBackend()
|
|
|
send_queue = MemoryQueueBackend()
|