Island: Rename IslandEventTopic.SET_MODE -> IslandEventTopic.SET_ISLAND_MODE

This commit is contained in:
Shreya Malviya 2022-09-21 16:14:45 +05:30
parent 822d9d6eec
commit 9ce652f1a5
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ class IslandEventTopic(Enum):
AGENT_CONNECTED = auto()
CLEAR_SIMULATION_DATA = auto()
RESET_AGENT_CONFIGURATION = auto()
SET_MODE = auto()
SET_ISLAND_MODE = auto()
class IIslandEventQueue(ABC):

View File

@ -28,7 +28,7 @@ class IslandMode(AbstractResource):
mode = IslandModeEnum(request.json)
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
except (AttributeError, json.decoder.JSONDecodeError):

View File

@ -60,5 +60,5 @@ def _subscribe_set_island_mode_events(
island_event_queue: IIslandEventQueue, container: DIContainer
):
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)
)