mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 21:11:32 +00:00
Fix anchor->key refactor conflicts after rebase
This commit is contained in:
parent
c96f50711d
commit
3341e97ef6
@ -1,5 +1,7 @@
|
||||
from tfw.event_handler_base import EventHandlerBase
|
||||
from tfw.components.mixins import SupervisorMixin
|
||||
from tfw.config.logs import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ProcessManager(SupervisorMixin):
|
||||
@ -14,9 +16,9 @@ class ProcessManager(SupervisorMixin):
|
||||
|
||||
|
||||
class ProcessManagingEventHandler(EventHandlerBase):
|
||||
def __init__(self, anchor, supervisor_process_name):
|
||||
super().__init__(anchor)
|
||||
def __init__(self, key, supervisor_process_name):
|
||||
super().__init__(key)
|
||||
self.processmanager = ProcessManager(supervisor_process_name)
|
||||
|
||||
def handle_event(self, anchor, data_json):
|
||||
def handle_event(self, key, data_json):
|
||||
self.processmanager(data_json['data']['command'])
|
||||
|
@ -7,9 +7,9 @@ from tfw.config import tfwenv
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
eventhandlers = {SourceCodeEventHandler('anchor_webide', tfwenv.WEBIDE_WD),
|
||||
TerminadoEventHandler('anchor_terminado', 'terminado'),
|
||||
ProcessManagingEventHandler('anchor_processmanager', 'login')}
|
||||
eventhandlers = {SourceCodeEventHandler('webide', tfwenv.WEBIDE_WD),
|
||||
TerminadoEventHandler('terminado', 'terminado'),
|
||||
ProcessManagingEventHandler('processmanager', 'login')}
|
||||
try:
|
||||
IOLoop.instance().start()
|
||||
finally:
|
||||
|
Loading…
Reference in New Issue
Block a user