mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-12-05 02:11:32 +00:00
Remove now duplicate EventHandler type specifications
This commit is contained in:
parent
b4ece4fc51
commit
d9fa357672
@ -4,7 +4,7 @@ from functools import partial
|
||||
from tornado.ioloop import IOLoop
|
||||
|
||||
from tfw.fsm import YamlFSM
|
||||
from tfw.event_handlers import FSMAwareEventHandler, ControlEventHandler
|
||||
from tfw.event_handlers import FSMAwareEventHandler
|
||||
from tfw.components.ide import IdeHandler, DeployHandler
|
||||
from tfw.components.terminal import TerminalHandler
|
||||
from tfw.components.frontend import FrontendProxyHandler, FrontendReadyHandler, ConsoleLogsHandler, MessageQueueHandler
|
||||
@ -32,11 +32,11 @@ def main():
|
||||
'test_fsm.yml',
|
||||
{} # jinja2 variables, empty dict enables jinja2 without any variables
|
||||
)
|
||||
), event_handler_type=ControlEventHandler)
|
||||
))
|
||||
# Web IDE backend
|
||||
ide_eh = eh_factory.build(IdeHandler(
|
||||
patterns=['/home/user/workdir/*', '/srv/webservice/user_ops.py']
|
||||
), event_handler_type=ControlEventHandler)
|
||||
))
|
||||
deploy_eh = eh_factory.build(DeployHandler())
|
||||
# Web shell backend
|
||||
terminal_eh = eh_factory.build(TerminalHandler(
|
||||
@ -44,23 +44,25 @@ def main():
|
||||
user=TAOENV.USER,
|
||||
working_directory=TFWENV.TERMINADO_WD,
|
||||
histfile=TFWENV.HISTFILE
|
||||
), event_handler_type=ControlEventHandler)
|
||||
))
|
||||
# Handles 'deploy' button clicks
|
||||
processmanager_eh = eh_factory.build(ProcessHandler(
|
||||
process_eh = eh_factory.build(ProcessHandler(
|
||||
supervisor_uri=TFWENV.SUPERVISOR_HTTP_URI
|
||||
), event_handler_type=ControlEventHandler)
|
||||
))
|
||||
# Sends live logs of webservice process to frontend
|
||||
logmonitor_eh = eh_factory.build(ProcessLogHandler(
|
||||
processlog_eh = eh_factory.build(ProcessLogHandler(
|
||||
process_name='webservice',
|
||||
supervisor_uri=TFWENV.SUPERVISOR_HTTP_URI,
|
||||
log_tail=2000
|
||||
), event_handler_type=ControlEventHandler)
|
||||
))
|
||||
# Proxies frontend API calls to frontend
|
||||
frontend_eh = eh_factory.build(FrontendProxyHandler(), event_handler_type=ControlEventHandler)
|
||||
frontendproxy_eh = eh_factory.build(FrontendProxyHandler())
|
||||
# Initiates first FSM step
|
||||
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)
|
||||
# Manages message queues
|
||||
messagequeue_eh = eh_factory.build(MessageQueueHandler(25))
|
||||
# Writes live logs to console on frontend
|
||||
console_logs_eh = eh_factory.build(ConsoleLogsHandler(stream='stdout'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user