Agent: Replace SendAllAgentEventsToIsland's __call__() with send_event()

This commit is contained in:
Shreya Malviya 2022-09-14 13:46:45 +05:30
parent 8256322a29
commit 404f6d954f
2 changed files with 2 additions and 2 deletions

View File

@ -254,7 +254,7 @@ class InfectionMonkey:
propagation_credentials_repository
),
)
event_queue.subscribe_all_events(SendAllAgentEventsToIsland(server_address))
event_queue.subscribe_all_events(SendAllAgentEventsToIsland(server_address).send_event)
@staticmethod
def _get_local_network_interfaces() -> List[IPv4Interface]:

View File

@ -29,7 +29,7 @@ class SendAllAgentEventsToIsland:
)
self._send_to_island_thread.start()
def __call__(self, event: AbstractAgentEvent):
def send_event(self, event: AbstractAgentEvent):
self._queue.put(self._serialize_event(event))
logger.debug(
f"Sending event of type {type(event).__name__} to the Island at {self._server_address}"