Skip to content

Commit

Permalink
fix(cisco_meraki): Stop collector when asked
Browse files Browse the repository at this point in the history
  • Loading branch information
frikilax committed Oct 21, 2024
1 parent f12ab06 commit bc51631
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vulture_os/toolkit/api_parser/cisco_meraki/cisco_meraki.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,25 @@ def get_logs(self, network_id, product_type, since):
def execute(self):

for orga in self.get_organizations():
if self.evt_stop.is_set():
break

logger.info(f"[{__parser__}]:execute: Getting organisation {orga['name']}", extra={'frontend': str(self.frontend)})
for network in self.get_organization_networks(orga['id']):
if self.evt_stop.is_set():
break

logger.info(f"[{__parser__}]:execute: Getting organisation network {network['name']}",
extra={'frontend': str(self.frontend)})
for product_type in network['productTypes']:
if self.evt_stop.is_set():
break

logger.info(f"[{__parser__}]:execute: Getting organisation network {network['name']} "
f"product {product_type}",
extra={'frontend': str(self.frontend)})
nb_events = 1
while nb_events > 0:
while nb_events > 0 and not self.evt_stop.is_set():
status, tmp_logs = self.get_logs(network['id'],
product_type,
self.frontend.cisco_meraki_timestamp.get(f"{network['id']}_{product_type}") or \
Expand Down

0 comments on commit bc51631

Please sign in to comment.