mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-09-08 19:54:10 +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.event_handler_base import EventHandlerBase
|
||||||
from tfw.components.mixins import SupervisorMixin
|
from tfw.components.mixins import SupervisorMixin
|
||||||
|
from tfw.config.logs import logging
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class ProcessManager(SupervisorMixin):
|
class ProcessManager(SupervisorMixin):
|
||||||
@ -14,9 +16,9 @@ class ProcessManager(SupervisorMixin):
|
|||||||
|
|
||||||
|
|
||||||
class ProcessManagingEventHandler(EventHandlerBase):
|
class ProcessManagingEventHandler(EventHandlerBase):
|
||||||
def __init__(self, anchor, supervisor_process_name):
|
def __init__(self, key, supervisor_process_name):
|
||||||
super().__init__(anchor)
|
super().__init__(key)
|
||||||
self.processmanager = ProcessManager(supervisor_process_name)
|
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'])
|
self.processmanager(data_json['data']['command'])
|
||||||
|
@ -7,9 +7,9 @@ from tfw.config import tfwenv
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
eventhandlers = {SourceCodeEventHandler('anchor_webide', tfwenv.WEBIDE_WD),
|
eventhandlers = {SourceCodeEventHandler('webide', tfwenv.WEBIDE_WD),
|
||||||
TerminadoEventHandler('anchor_terminado', 'terminado'),
|
TerminadoEventHandler('terminado', 'terminado'),
|
||||||
ProcessManagingEventHandler('anchor_processmanager', 'login')}
|
ProcessManagingEventHandler('processmanager', 'login')}
|
||||||
try:
|
try:
|
||||||
IOLoop.instance().start()
|
IOLoop.instance().start()
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
Reference in New Issue
Block a user