mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 22:07:17 +00:00
Use new LogMonitoringEventHandler instead of naked LogMonitor observer
This commit is contained in:
parent
7e717b8829
commit
8b8e6ed5fb
@ -3,7 +3,7 @@ from ast import literal_eval
|
|||||||
from tornado.ioloop import IOLoop
|
from tornado.ioloop import IOLoop
|
||||||
|
|
||||||
from tfw.components import IdeEventHandler, TerminalEventHandler, ProcessManagingEventHandler, BashMonitor
|
from tfw.components import IdeEventHandler, TerminalEventHandler, ProcessManagingEventHandler, BashMonitor
|
||||||
from tfw.components import TerminalCommands, LogMonitor
|
from tfw.components import TerminalCommands, LogMonitoringEventHandler
|
||||||
from tfw.networking import MessageSender, TFWServerConnector
|
from tfw.networking import MessageSender, TFWServerConnector
|
||||||
from tfw.config import TFWENV
|
from tfw.config import TFWENV
|
||||||
from tfw.config.logs import logging
|
from tfw.config.logs import logging
|
||||||
@ -83,14 +83,17 @@ if __name__ == '__main__':
|
|||||||
dirmonitor=ide.monitor,
|
dirmonitor=ide.monitor,
|
||||||
log_tail=2000
|
log_tail=2000
|
||||||
)
|
)
|
||||||
LogMonitor('webservice', log_tail=2000).watch() # Sends live logs of webservice process to frontend
|
logmonitor = LogMonitoringEventHandler( # Sends live logs of webservice process to frontend
|
||||||
|
'webservice',
|
||||||
|
log_tail=2000
|
||||||
|
)
|
||||||
|
eventhandlers = {ide, terminal, processmanager, logmonitor}
|
||||||
|
|
||||||
terminal.historymonitor.subscribe_callback(cenator)
|
terminal.historymonitor.subscribe_callback(cenator)
|
||||||
|
|
||||||
commands = TestCommands(bashrc=f'/home/{TAOENV.USER}/.bashrc')
|
commands = TestCommands(bashrc=f'/home/{TAOENV.USER}/.bashrc')
|
||||||
terminal.historymonitor.subscribe_callback(commands.callback)
|
terminal.historymonitor.subscribe_callback(commands.callback)
|
||||||
|
|
||||||
eventhandlers = {ide, terminal, processmanager}
|
|
||||||
try:
|
try:
|
||||||
IOLoop.instance().start()
|
IOLoop.instance().start()
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
Reference in New Issue
Block a user