forked from p15670423/monkey
Island: Simplify logic in island_event_handlers._subscribe_clear_simulation_data_events
This commit is contained in:
parent
f93565b2cf
commit
638e4cd7ed
|
@ -39,16 +39,11 @@ def _subscribe_clear_simulation_data_events(
|
||||||
IslandEventTopic.CLEAR_SIMULATION_DATA, credentials_repository.remove_stolen_credentials
|
IslandEventTopic.CLEAR_SIMULATION_DATA, credentials_repository.remove_stolen_credentials
|
||||||
)
|
)
|
||||||
|
|
||||||
node_repository = container.resolve(INodeRepository)
|
for i_repository in [
|
||||||
island_event_queue.subscribe(IslandEventTopic.CLEAR_SIMULATION_DATA, node_repository.reset)
|
INodeRepository,
|
||||||
|
IAgentEventRepository,
|
||||||
agent_event_repository = container.resolve(IAgentEventRepository)
|
IAgentRepository,
|
||||||
island_event_queue.subscribe(
|
IMachineRepository,
|
||||||
IslandEventTopic.CLEAR_SIMULATION_DATA, agent_event_repository.reset
|
]:
|
||||||
)
|
repository = container.resolve(i_repository)
|
||||||
|
island_event_queue.subscribe(IslandEventTopic.CLEAR_SIMULATION_DATA, repository.reset)
|
||||||
agent_repository = container.resolve(IAgentRepository)
|
|
||||||
island_event_queue.subscribe(IslandEventTopic.CLEAR_SIMULATION_DATA, agent_repository.reset)
|
|
||||||
|
|
||||||
machine_repository = container.resolve(IMachineRepository)
|
|
||||||
island_event_queue.subscribe(IslandEventTopic.CLEAR_SIMULATION_DATA, machine_repository.reset)
|
|
||||||
|
|
Loading…
Reference in New Issue