mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-06 02:51:22 +00:00
18 lines
630 B
Python
18 lines
630 B
Python
from tfw.event_handler_base import EventHandlerBase
|
|
from tfw.components.mixins import SupervisorMixin
|
|
from tfw.config import tfwenv
|
|
from tfw.config.logs import logging
|
|
log = logging.getLogger(__name__)
|
|
|
|
|
|
class TerminadoEventHandler(EventHandlerBase, SupervisorMixin):
|
|
def __init__(self, anchor, process_name):
|
|
super().__init__(anchor)
|
|
self.working_directory = tfwenv.TERMINADO_DIR
|
|
self.process_name = process_name
|
|
self.start_process()
|
|
|
|
def handle_event(self, anchor, data_json):
|
|
log.debug('TerminadoEventHandler received event for anchor {}'.format(anchor))
|
|
# TODO: wat do?
|