forked from p34709852/monkey
Island: Rename IslandEventTopic.SET_MODE -> IslandEventTopic.SET_ISLAND_MODE
This commit is contained in:
parent
822d9d6eec
commit
9ce652f1a5
|
@ -9,7 +9,7 @@ class IslandEventTopic(Enum):
|
||||||
AGENT_CONNECTED = auto()
|
AGENT_CONNECTED = auto()
|
||||||
CLEAR_SIMULATION_DATA = auto()
|
CLEAR_SIMULATION_DATA = auto()
|
||||||
RESET_AGENT_CONFIGURATION = auto()
|
RESET_AGENT_CONFIGURATION = auto()
|
||||||
SET_MODE = auto()
|
SET_ISLAND_MODE = auto()
|
||||||
|
|
||||||
|
|
||||||
class IIslandEventQueue(ABC):
|
class IIslandEventQueue(ABC):
|
||||||
|
|
|
@ -28,7 +28,7 @@ class IslandMode(AbstractResource):
|
||||||
mode = IslandModeEnum(request.json)
|
mode = IslandModeEnum(request.json)
|
||||||
|
|
||||||
self._island_mode_service.set_mode(mode)
|
self._island_mode_service.set_mode(mode)
|
||||||
self._island_event_queue.publish(topic=IslandEventTopic.SET_MODE, event=mode)
|
self._island_event_queue.publish(topic=IslandEventTopic.SET_ISLAND_MODE, event=mode)
|
||||||
|
|
||||||
return {}, HTTPStatus.NO_CONTENT
|
return {}, HTTPStatus.NO_CONTENT
|
||||||
except (AttributeError, json.decoder.JSONDecodeError):
|
except (AttributeError, json.decoder.JSONDecodeError):
|
||||||
|
|
|
@ -60,5 +60,5 @@ def _subscribe_set_island_mode_events(
|
||||||
island_event_queue: IIslandEventQueue, container: DIContainer
|
island_event_queue: IIslandEventQueue, container: DIContainer
|
||||||
):
|
):
|
||||||
island_event_queue.subscribe(
|
island_event_queue.subscribe(
|
||||||
IslandEventTopic.SET_MODE, container.resolve(set_agent_configuration_per_island_mode)
|
IslandEventTopic.SET_ISLAND_MODE, container.resolve(set_agent_configuration_per_island_mode)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue