Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
fix: add toJson() method to onetime_task (#127)
Browse files Browse the repository at this point in the history
* fix: add toJson() method to onetime_task

* fix: put self.clean_job_inventory outside of the loop
  • Loading branch information
omrozowicz-splunk authored Sep 21, 2021
1 parent 4dd2c28 commit 04b16f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion splunk_connect_for_snmp_poller/manager/poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def __check_inventory(self):
self.process_new_job(entry_key, ir)
else:
self.update_schedule_for_changed_conf(entry_key, ir)
self.clean_job_inventory(inventory_hosts)
self.clean_job_inventory(inventory_hosts)

def clean_job_inventory(self, inventory_hosts):
for entry_key in list(self._jobs_map):
Expand Down
2 changes: 1 addition & 1 deletion splunk_connect_for_snmp_poller/manager/poller_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def onetime_task(inventory_record: InventoryRecord, server_config, splunk_indexe
logger.debug("Executing onetime_task for %s", inventory_record.__repr__())

snmp_polling.delay(
inventory_record,
inventory_record.toJson(),
server_config,
splunk_indexes,
one_time_flag=True,
Expand Down

0 comments on commit 04b16f7

Please sign in to comment.