forked from 0x2620/pandora
rename rabbitmq routing
This commit is contained in:
parent
1af5ac87b5
commit
d2aae7d958
1 changed files with 5 additions and 5 deletions
|
@ -7,17 +7,17 @@ import models
|
||||||
|
|
||||||
def send_bg_message(msg):
|
def send_bg_message(msg):
|
||||||
conn = DjangoBrokerConnection()
|
conn = DjangoBrokerConnection()
|
||||||
publisher = Publisher(connection=conn, exchange="oxdb-bg",
|
publisher = Publisher(connection=conn, exchange="pandora-bg",
|
||||||
routing_key="oxdb-bg")
|
routing_key="pandora-bg")
|
||||||
publisher.send(msg)
|
publisher.send(msg)
|
||||||
publisher.close()
|
publisher.close()
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
conn = DjangoBrokerConnection()
|
conn = DjangoBrokerConnection()
|
||||||
|
|
||||||
consumer = Consumer(connection=conn, queue="oxdb-bg",
|
consumer = Consumer(connection=conn, queue="pandora-bg",
|
||||||
exchange="oxdb-bg",
|
exchange="pandora-bg",
|
||||||
routing_key="oxdb-bg")
|
routing_key="pandora-bg")
|
||||||
def handle_background_tasks_callback(data, message):
|
def handle_background_tasks_callback(data, message):
|
||||||
print("Got bg message")
|
print("Got bg message")
|
||||||
print data
|
print data
|
||||||
|
|
Loading…
Reference in a new issue