Use new LogMonitoringEventHandler instead of naked LogMonitor observer

This commit is contained in:
Kristóf Tóth 2018-05-30 13:15:13 +02:00
parent 7e717b8829
commit 8b8e6ed5fb
1 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,7 @@ from ast import literal_eval
from tornado.ioloop import IOLoop
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.config import TFWENV
from tfw.config.logs import logging
@ -83,14 +83,17 @@ if __name__ == '__main__':
dirmonitor=ide.monitor,
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)
commands = TestCommands(bashrc=f'/home/{TAOENV.USER}/.bashrc')
terminal.historymonitor.subscribe_callback(commands.callback)
eventhandlers = {ide, terminal, processmanager}
try:
IOLoop.instance().start()
finally: