mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	use global db connection if configured
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user