random chars for queue name to avoid collisions on restart
This commit is contained in:
@@ -4,6 +4,7 @@ import sys
|
||||
import logging
|
||||
import requests
|
||||
from weather_utility import parse_weather_xml, publish_weather
|
||||
import uuid
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
@@ -19,7 +20,8 @@ USER = "anonymous"
|
||||
PASSWORD = "anonymous"
|
||||
EXCHANGE = "xpublic"
|
||||
|
||||
QUEUE_NAME = "q_anonymous.subscribe.citypage.companyis2ari.ca"
|
||||
rnd_6_chars = uuid.uuid4().hex[:6]
|
||||
QUEUE_NAME = f"q_anonymous.subscribe.citypage.{rnd_6_chars}company2ari.ca"
|
||||
SUBTOPIC = "#.WXO-DD.citypage_weather.ON.#"
|
||||
|
||||
def on_message(message):
|
||||
|
||||
Reference in New Issue
Block a user