@@ -171,6 +171,7 @@ def run_enricher_check(
171
171
def delete_all_entries_per_host (self , host ):
172
172
for entry_key in list (self ._jobs_map .keys ()):
173
173
if entry_key .split ("#" )[0 ] == host :
174
+ logger .debug ("Removing job for %s" , entry_key )
174
175
schedule .cancel_job (self ._jobs_map .get (entry_key ))
175
176
del self ._jobs_map [entry_key ]
176
177
@@ -264,7 +265,7 @@ def __start_realtime_scheduler_task(self):
264
265
265
266
schedule .every (self ._args .matching_task_frequency ).seconds .do (
266
267
self .process_unmatched_devices_job ,
267
- self ._server_config ,
268
+ self ._args . config ,
268
269
)
269
270
270
271
automatic_realtime_job (
@@ -288,15 +289,16 @@ def add_device_for_profile_matching(self, device: InventoryRecord):
288
289
self ._unmatched_devices [device .host ] = device
289
290
self ._lock .release ()
290
291
291
- def process_unmatched_devices_job (self , server_config ):
292
+ def process_unmatched_devices_job (self , config_location ):
292
293
job_thread = threading .Thread (
293
- target = self .process_unmatched_devices , args = [server_config ]
294
+ target = self .process_unmatched_devices , args = [config_location ]
294
295
)
295
296
job_thread .start ()
296
297
297
- def process_unmatched_devices (self , server_config ):
298
+ def process_unmatched_devices (self , config_location ):
298
299
if self ._unmatched_devices :
299
300
try :
301
+ server_config = parse_config_file (config_location )
300
302
profiles = get_profiles (server_config )
301
303
self ._lock .acquire ()
302
304
processed_devices = set ()
0 commit comments