[11.10.20] syncId generation
This commit is contained in:
parent
aeb332c15a
commit
abd53bce27
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import stomp
|
||||
import os
|
||||
import os, uuid
|
||||
|
||||
from src.utils.jsonLogger import log
|
||||
|
||||
@ -19,12 +19,19 @@ class keys():
|
||||
|
||||
def activeMQSender(message):
|
||||
addr, port, mqUser, mqPass = keys().returnKeys()
|
||||
syncId = uuid.uuid4()
|
||||
|
||||
log("Attempting Connection to Artemis...", 'INFO')
|
||||
con = stomp.Connection([(addr, port)], auto_content_length=False)
|
||||
con.connect( mqUser, mqPass, wait=True)
|
||||
|
||||
con.send("PricingSave", message, content_type="application/json", headers={"Content-Type":"application/json"})
|
||||
con.send("PricingSave",
|
||||
message,
|
||||
content_type="application/json",
|
||||
headers={
|
||||
"Content-Type":"application/json",
|
||||
"X-CRYPTO-Sync-ID":syncId
|
||||
})
|
||||
|
||||
con.disconnect()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user