fixed internal logger dumplicated output (#299)
* fixed internal logger dumplicated output * delete unused import * fixed isort
This commit is contained in:
Родитель
2887bb0482
Коммит
ed0ff75c65
|
@ -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.
|
||||
|
@ -113,5 +106,4 @@ class SessionMessage(Message):
|
|||
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}.')
|
||||
|
|
Загрузка…
Ссылка в новой задаче