continue even if mqtt fails - add version info
This commit is contained in:
parent
2be7162838
commit
b01f4de1c5
|
@ -19,11 +19,10 @@ class MQTTClient:
|
|||
self.mqtt_client.tls_set()
|
||||
self.mqtt_client.connect(server, 8883, 60)
|
||||
self.mqtt_client.loop_start()
|
||||
self.logger.info('MQTT connection successfull')
|
||||
except Exception as err:
|
||||
self.logger.error('MQTT connection failed - exiting: %s', str(err))
|
||||
raise SystemExit(1)
|
||||
self.logger.error('MQTT connection failed: %s', str(err))
|
||||
|
||||
self.logger.info('MQTT connection successfull')
|
||||
self.base_topic = base_topic
|
||||
|
||||
def send_message(self, f_type, f_id, pdf_data=None, pdf_file=None):
|
||||
|
|
2
main.py
2
main.py
|
@ -36,6 +36,7 @@ LODUR_USER = os.getenv("LODUR_USER")
|
|||
LODUR_PASSWORD = os.getenv("LODUR_PASSWORD")
|
||||
LODUR_BASE_URL = os.getenv("LODUR_BASE_URL")
|
||||
HEARTBEAT_URL = os.getenv("HEARTBEAT_URL")
|
||||
PYLOKID_VERSION = "1.1.0"
|
||||
|
||||
def main():
|
||||
""" main """
|
||||
|
@ -46,6 +47,7 @@ def main():
|
|||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||
)
|
||||
logger = logging.getLogger('pylokid')
|
||||
logger.info('Starting pylokid version %s', PYLOKID_VERSION)
|
||||
|
||||
# Initialize IMAP Session
|
||||
imap_client = EmailHandling(
|
||||
|
|
Loading…
Reference in New Issue