while True:
if (len(generic_messages)):
- for topicname in generic_messages.keys(): #topicname contains the path of the topics, eg. "/event/<topic>"
+ keys_copy = list(generic_messages.keys())
+ for topicname in keys_copy: #topicname contains the path of the topics, eg. "/event/<topic>"
topic_queue=generic_messages[topicname]
if (len(topic_queue)>0):
if (topicname.endswith(".text")):
uploader_thread=Thread(target=dmaap_uploader)
uploader_thread.start()
-if os.environ['GENERIC_TOPICS_UPLOAD_BASEURL'] is not None:
+if 'GENERIC_TOPICS_UPLOAD_BASEURL' in os.environ:
print("GENERIC_TOPICS_UPLOAD_BASEURL:"+os.environ['GENERIC_TOPICS_UPLOAD_BASEURL'])
generic_topics_upload_baseurl=os.environ['GENERIC_TOPICS_UPLOAD_BASEURL']
if generic_topics_upload_baseurl and generic_uploader_thread is None: