Specify EventHandler types in builtin handlers

This commit is contained in:
Kristóf Tóth 2019-08-30 14:45:53 +02:00
parent 25cf672231
commit 9712ebf102
7 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,7 @@ from .message_storage import FrontendMessageStorage
class FrontendProxyHandler: class FrontendProxyHandler:
keys = ['console', 'dashboard', 'frontend', 'message', 'ide.read', 'deploy.finish'] keys = ['console', 'dashboard', 'frontend', 'message', 'ide.read', 'deploy.finish']
type_id = 'ControlEventHandler'
def __init__(self): def __init__(self):
self.connector = None self.connector = None

View File

@ -5,6 +5,7 @@ from threading import Thread
class MessageQueueHandler: class MessageQueueHandler:
keys = ['message.queue'] keys = ['message.queue']
type_id = 'ControlEventHandler'
def __init__(self, wpm): def __init__(self, wpm):
self.connector = None self.connector = None

View File

@ -10,6 +10,7 @@ LOG = logging.getLogger(__name__)
class FSMHandler: class FSMHandler:
keys = ['fsm'] keys = ['fsm']
type_id = 'ControlEventHandler'
def __init__(self, *, fsm_type): def __init__(self, *, fsm_type):
self.connector = None self.connector = None

View File

@ -34,6 +34,7 @@ BUILD_ARTIFACTS = (
class IdeHandler: class IdeHandler:
keys = ['ide'] keys = ['ide']
type_id = 'ControlEventHandler'
def __init__(self, *, patterns, initial_file=''): def __init__(self, *, patterns, initial_file=''):
self.connector = None self.connector = None

View File

@ -10,6 +10,7 @@ LOG = logging.getLogger(__name__)
class ProcessHandler(ProcessManager): class ProcessHandler(ProcessManager):
keys = ['process'] keys = ['process']
type_id = 'ControlEventHandler'
def __init__(self, *, supervisor_uri): def __init__(self, *, supervisor_uri):
ProcessManager.__init__(self, supervisor_uri) ProcessManager.__init__(self, supervisor_uri)

View File

@ -7,6 +7,7 @@ LOG = logging.getLogger(__name__)
class ProcessLogHandler: class ProcessLogHandler:
keys = ['process.log'] keys = ['process.log']
type_id = 'ControlEventHandler'
def __init__(self, *, process_name, supervisor_uri, log_tail=0): def __init__(self, *, process_name, supervisor_uri, log_tail=0):
self.connector, self._monitor = None, None self.connector, self._monitor = None, None

View File

@ -8,6 +8,7 @@ LOG = logging.getLogger(__name__)
class TerminalHandler: class TerminalHandler:
keys = ['terminal'] keys = ['terminal']
type_id = 'ControlEventHandler'
def __init__(self, *, port, user, working_directory, histfile): def __init__(self, *, port, user, working_directory, histfile):
self.connector, self._historymonitor = None, None self.connector, self._historymonitor = None, None