mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 10:58:42 +00:00
use global db connection if configured
This commit is contained in:
parent
a89018ab91
commit
b68df56b14
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user