Make gateway executable

This commit is contained in:
zewelor
2017-11-29 08:56:09 +01:00
parent 6a1c7b0181
commit 550765d096
2 changed files with 26 additions and 26 deletions
Regular → Executable
+6 -2
View File
@@ -1,5 +1,8 @@
#!/usr/bin/python
import logging
import sys
if sys.version_info < (3,4):
print("To use this script you need python 3.4 or newer! got %s" % sys.version_info)
sys.exit(1)
@@ -20,10 +23,10 @@ if parsed.debug:
else:
_LOGGER.setLevel(logging.INFO)
_LOGGER.info('Starting')
_LOGGER.debug('Starting')
mqtt = MqttClient(settings['mqtt'])
manager = WorkersManager(settings['workers'], mqtt)
WorkersManager.start(mqtt, settings['workers'])
running = True
@@ -38,3 +41,4 @@ try:
except KeyboardInterrupt:
running = False
_LOGGER.info('Exiting allowing jobs to finish. If you need force exit use kill')