Skip to content

Commit

Permalink
ver
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiionutdamian committed Feb 19, 2024
1 parent 04ae37f commit 5253320
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion labs/labs-internal/emqx/app/src/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
from paho.mqtt import client as mqttc
from paho.mqtt import __version__ as mqtt_version

__VER__ = '0.0.1'



def generate_thread_id():
"""Generate a unique 5 character thread ID."""
return ''.join(random.choices(string.ascii_letters + string.digits, k=5))
Expand All @@ -28,7 +32,7 @@ class BaseMQTT:
def __init__(self, logger, host, port, topic=None, retry=5, retry_delay=5):
self.logger = logger
self.client = None
self.P(f"Using paho-mqtt version {mqtt_version}")
self.P(f"{self.__class__.__name__} v{__VER__} using paho-mqtt version {mqtt_version}")
self.host = host
self.port = port
self.topic = topic
Expand Down
1 change: 0 additions & 1 deletion labs/labs-internal/emqx/app/src/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
TOPIC = '/topic_root/subtopic'



class SimpleListener(BaseMQTT):
def __init__(self, *args, **kwargs):
super(SimpleListener, self).__init__(*args, **kwargs)
Expand Down

0 comments on commit 5253320

Please sign in to comment.