parent
6f836b63f7
commit
c17c5b61c4
1 changed files with 9 additions and 2 deletions
|
@ -192,7 +192,14 @@ def main():
|
||||||
db.init(args.store, pragmas={'journal_mode': 'wal'})
|
db.init(args.store, pragmas={'journal_mode': 'wal'})
|
||||||
create_tables()
|
create_tables()
|
||||||
|
|
||||||
monitor_url = System.get_or_none(System.key == "monitor_url")
|
monitor_url_check = System.get_or_none(System.key == "monitor_url")
|
||||||
|
if monitor_url_check is None:
|
||||||
|
monitor_url = None
|
||||||
|
else:
|
||||||
|
if len(monitor_url_check.value) < 8:
|
||||||
|
monitor_url = None
|
||||||
|
else:
|
||||||
|
monitor_url = monitor_url_check.value
|
||||||
|
|
||||||
log_queue = Queue()
|
log_queue = Queue()
|
||||||
event_queue = Queue()
|
event_queue = Queue()
|
||||||
|
@ -209,7 +216,7 @@ def main():
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
logging.debug("starting up main")
|
logging.debug("starting up main")
|
||||||
log_thread = threading.Thread(target=logger_thread,
|
log_thread = threading.Thread(target=logger_thread,
|
||||||
args=(log_queue,monitor_url.value,))
|
args=(log_queue,monitor_url,))
|
||||||
log_thread.start()
|
log_thread.start()
|
||||||
e_thread = threading.Thread(target=event_thread, args=(event_queue,))
|
e_thread = threading.Thread(target=event_thread, args=(event_queue,))
|
||||||
e_thread.start()
|
e_thread.start()
|
||||||
|
|
Loading…
Reference in a new issue