From 39a7ae0964b589df1a81cff612c82109dcbc924c Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 13 Sep 2022 19:32:52 +0530 Subject: [PATCH] Agent: Rename DEFAULT_TIME_PERIOD -> DEFAULT_TIME_PERIOD_SECONDS in send_all_events_to_island.py --- monkey/infection_monkey/send_all_events_to_island.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/send_all_events_to_island.py b/monkey/infection_monkey/send_all_events_to_island.py index 90d009b37..ecd895464 100644 --- a/monkey/infection_monkey/send_all_events_to_island.py +++ b/monkey/infection_monkey/send_all_events_to_island.py @@ -12,8 +12,8 @@ from common.events import AbstractAgentEvent logger = logging.getLogger(__name__) -DEFAULT_TIME_PERIOD = 5 WAKES_PER_PERIOD = 4 +DEFAULT_TIME_PERIOD_SECONDS = 5 EVENTS_API_URL = "https://%s/api/events" @@ -27,7 +27,7 @@ class send_all_events_to_island: self._queue: queue.Queue[AbstractAgentEvent] = queue.Queue() self._send_to_island_thread = self._batch_and_send_events_thread( - self._queue, self._server_address, DEFAULT_TIME_PERIOD + self._queue, self._server_address, DEFAULT_TIME_PERIOD_SECONDS ) self._send_to_island_thread.start() @@ -63,7 +63,7 @@ class send_all_events_to_island: def _manage_event_batches(self): while self._should_run_batch_and_send_thread: self._send_events_to_island() - sleep(DEFAULT_TIME_PERIOD) + sleep(self._time_period) self._send_remaining_events()