From 21cfaebe8a6c1061036b34cf2d988039a617d8db Mon Sep 17 00:00:00 2001 From: "R. Richard" Date: Tue, 27 Aug 2019 13:08:41 +0200 Subject: [PATCH] Instantiate FrontendReadyHandler --- solvable/src/event_handler_main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/solvable/src/event_handler_main.py b/solvable/src/event_handler_main.py index 0a4a0d0..fddd5f3 100644 --- a/solvable/src/event_handler_main.py +++ b/solvable/src/event_handler_main.py @@ -7,7 +7,7 @@ from tfw.fsm import YamlFSM from tfw.event_handlers import FSMAwareEventHandler, ControlEventHandler from tfw.components.ide import IdeHandler, DeployHandler from tfw.components.terminal import TerminalHandler -from tfw.components.frontend import FrontendProxyHandler, ConsoleLogsHandler, MessageQueueHandler +from tfw.components.frontend import FrontendProxyHandler, FrontendReadyHandler, ConsoleLogsHandler, MessageQueueHandler from tfw.components.process_management import ProcessHandler, ProcessLogHandler from tfw.components.fsm import FSMHandler from tfw.main import EventHandlerFactory, setup_logger, setup_signal_handlers @@ -18,6 +18,7 @@ from custom_handlers import CenatorHandler, TestCommandsHandler, messageFSMSteps LOG = logging.getLogger(__name__) + def main(): # pylint: disable=unused-variable setup_logger(__file__) @@ -30,8 +31,7 @@ def main(): YamlFSM, 'test_fsm.yml', {} # jinja2 variables, empty dict enables jinja2 without any variables - ), - initial_trigger='step_1' + ) ), event_handler_type=ControlEventHandler) # Web IDE backend ide_eh = eh_factory.build(IdeHandler( @@ -57,6 +57,9 @@ def main(): ), event_handler_type=ControlEventHandler) # Proxies frontend API calls to frontend frontend_eh = eh_factory.build(FrontendProxyHandler(), event_handler_type=ControlEventHandler) + ready = FrontendReadyHandler('step_1') + ready_eh = eh_factory.build(ready) + ready.stop = ready_eh.stop message_queue_eh = eh_factory.build(MessageQueueHandler(25), event_handler_type=ControlEventHandler) # Writes live logs to console on frontend console_logs_eh = eh_factory.build(ConsoleLogsHandler(stream='stdout'))