Island: Shorten subscription code

This commit is contained in:
Mike Salvatore 2022-09-14 13:55:13 -04:00
parent b3e9bbe05f
commit 03c49fe4da
1 changed files with 1 additions and 2 deletions

View File

@ -15,8 +15,7 @@ def setup_agent_event_handlers(container: DIContainer):
def _subscribe_and_store_to_event_repository(container: DIContainer): def _subscribe_and_store_to_event_repository(container: DIContainer):
agent_event_queue = container.resolve(IAgentEventQueue) agent_event_queue = container.resolve(IAgentEventQueue)
event_repository = container.resolve(IEventRepository) save_event_subscriber = save_event_to_event_repository(container.resolve(IEventRepository))
save_event_subscriber = save_event_to_event_repository(event_repository)
agent_event_queue.subscribe_all_events(save_event_subscriber) agent_event_queue.subscribe_all_events(save_event_subscriber)
save_stolen_credentials_subscriber = save_stolen_credentials_to_repository( save_stolen_credentials_subscriber = save_stolen_credentials_to_repository(