make producer infi
This commit is contained in:
+4
-1
@@ -1,4 +1,5 @@
|
||||
import pika
|
||||
import time
|
||||
import json
|
||||
|
||||
conn = pika.BlockingConnection(pika.ConnectionParameters("localhost"))
|
||||
@@ -21,7 +22,9 @@ orders = [
|
||||
"should_fail": False, "retry_count": 0},
|
||||
]
|
||||
|
||||
for order in orders:
|
||||
while True:
|
||||
for order in orders:
|
||||
time.sleep(1)
|
||||
body = json.dumps(order)
|
||||
ch.basic_publish(
|
||||
exchange="orders.x",
|
||||
|
||||
Reference in New Issue
Block a user