From 13c9e41a4c71d6da0b1d6337b12fb53b7b034b0e Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 28 Jun 2021 11:15:46 -0400 Subject: [PATCH] agent: Extract default period to constant --- .../telemetry/messengers/batching_telemetry_messenger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/telemetry/messengers/batching_telemetry_messenger.py b/monkey/infection_monkey/telemetry/messengers/batching_telemetry_messenger.py index 43fbf1306..c170a0ef0 100644 --- a/monkey/infection_monkey/telemetry/messengers/batching_telemetry_messenger.py +++ b/monkey/infection_monkey/telemetry/messengers/batching_telemetry_messenger.py @@ -7,6 +7,7 @@ from infection_monkey.telemetry.i_batchable_telem import IBatchableTelem from infection_monkey.telemetry.i_telem import ITelem from infection_monkey.telemetry.messengers.i_telemetry_messenger import ITelemetryMessenger +DEFAULT_PERIOD = 5 WAKES_PER_PERIOD = 4 @@ -16,7 +17,7 @@ class BatchingTelemetryMessenger(ITelemetryMessenger): and periodically sends them to Monkey Island. """ - def __init__(self, telemetry_messenger: ITelemetryMessenger, period=5): + def __init__(self, telemetry_messenger: ITelemetryMessenger, period=DEFAULT_PERIOD): self._telemetry_messenger = telemetry_messenger self._period = period