Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions maro/communication/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@
# Licensed under the MIT license.

# native lib
import sys
import uuid
from enum import Enum
from typing import Union

# private lib
from maro.utils import InternalLogger
from maro.utils.exit_code import NON_RESTART_EXIT_CODE

from .utils import session_id_generator

logger = InternalLogger(component_name="message")


class SessionType(Enum):
"""Communication session categories.
Expand Down Expand Up @@ -113,5 +106,4 @@ def __init__(
elif self.session_type == SessionType.NOTIFICATION:
self.session_stage = session_stage if session_stage else NotificationSessionStage.REQUEST
else:
logger.error(f"Receive unrecognized session type {self.session_type}, please use the SessionType class.")
sys.exit(NON_RESTART_EXIT_CODE)
raise KeyError(f'Unsupported session type {self.session_type}.')