mirror of
				https://github.com/avatao-content/test-tutorial-framework
				synced 2025-11-04 02:52:55 +00:00 
			
		
		
		
	Comply TFW lib changes
This commit is contained in:
		@@ -5,13 +5,12 @@ from signal import signal, SIGTERM, SIGINT
 | 
			
		||||
from tornado.ioloop import IOLoop
 | 
			
		||||
 | 
			
		||||
from tfw.fsm import YamlFSM
 | 
			
		||||
from tfw.event_handler_base import EventHandlerBase, FSMAwareEventHandler
 | 
			
		||||
from tfw.event_handlers import EventHandlerBase, FSMAwareEventHandler, TFWServerUplinkConnector
 | 
			
		||||
from tfw.components import IdeEventHandler, TerminalEventHandler
 | 
			
		||||
from tfw.components import ProcessManagingEventHandler, BashMonitor
 | 
			
		||||
from tfw.components import TerminalCommands, LogMonitoringEventHandler
 | 
			
		||||
from tfw.components import FSMManagingEventHandler, DirectorySnapshottingEventHandler
 | 
			
		||||
from tfw.components import FrontendEventHandler
 | 
			
		||||
from tfw.networking import MessageSender, TFWServerConnector
 | 
			
		||||
from tfw.components import FrontendEventHandler, MessageSender
 | 
			
		||||
from tfw.config import TFWENV
 | 
			
		||||
from tfw.config.logs import logging
 | 
			
		||||
from tao.config import TAOENV
 | 
			
		||||
@@ -45,7 +44,7 @@ class TestCommands(TerminalCommands):
 | 
			
		||||
        """
 | 
			
		||||
        if not args:
 | 
			
		||||
            message_template = """'{"key": "", "data": {"command": ""}}'"""
 | 
			
		||||
            TFWServerConnector().send_message({
 | 
			
		||||
            TFWServerUplinkConnector().send_message({
 | 
			
		||||
                'key': 'shell',
 | 
			
		||||
                'data': {
 | 
			
		||||
                    'command': 'write',
 | 
			
		||||
@@ -53,7 +52,7 @@ class TestCommands(TerminalCommands):
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
        else:
 | 
			
		||||
            TFWServerConnector().send_message(literal_eval(args[0]))
 | 
			
		||||
            TFWServerUplinkConnector().send_message(literal_eval(args[0]))
 | 
			
		||||
 | 
			
		||||
    def command_seppuku_tfw(self, *args):
 | 
			
		||||
        """
 | 
			
		||||
@@ -65,7 +64,7 @@ class TestCommands(TerminalCommands):
 | 
			
		||||
            'nohup sh -c "supervisorctl restart tfwserver event_handler_main" &> /dev/null & '
 | 
			
		||||
            'clear && echo "Committed seppuku! :)" && sleep infinity'
 | 
			
		||||
        )
 | 
			
		||||
        uplink = TFWServerConnector()
 | 
			
		||||
        uplink = TFWServerUplinkConnector()
 | 
			
		||||
        uplink.send_message({
 | 
			
		||||
            'key': 'shell',
 | 
			
		||||
            'data': {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ from signal import signal, SIGTERM, SIGINT
 | 
			
		||||
 | 
			
		||||
from tornado.ioloop import IOLoop
 | 
			
		||||
 | 
			
		||||
from tfw.event_handler_base import EventHandlerBase
 | 
			
		||||
from tfw.event_handlers import EventHandlerBase
 | 
			
		||||
from tfw.components import PipeIOEventHandler
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user