Fix anchor->key refactor conflicts after rebase

This commit is contained in:
Kristóf Tóth 2018-02-27 14:11:13 +01:00
parent c96f50711d
commit 3341e97ef6
2 changed files with 8 additions and 6 deletions

View File

@ -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'])

View File

@ -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: