use global db connection if configured

This commit is contained in:
Clint Armstrong 2015-09-14 09:35:55 -04:00
parent a89018ab91
commit b68df56b14

View File

@ -266,8 +266,14 @@ def poll_worker():
global dev_query
global devices_scanned
global dont_query_until
global single_connection
thread_id = threading.current_thread().name
db = DB()
if single_connection:
global db
else:
db = DB()
while True:
if datetime.now() < dont_query_until:
time.sleep(1)