From 3341e97ef6dc9b4c2f63f2abdcaf2d417af16cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 27 Feb 2018 14:11:13 +0100 Subject: [PATCH] Fix anchor->key refactor conflicts after rebase --- lib/tfw/components/process_managing_event_handler.py | 8 +++++--- src/demo/event_handler_main.py | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/tfw/components/process_managing_event_handler.py b/lib/tfw/components/process_managing_event_handler.py index d23fe5b..ebe0629 100644 --- a/lib/tfw/components/process_managing_event_handler.py +++ b/lib/tfw/components/process_managing_event_handler.py @@ -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']) diff --git a/src/demo/event_handler_main.py b/src/demo/event_handler_main.py index 42a01cf..ff6f362 100644 --- a/src/demo/event_handler_main.py +++ b/src/demo/event_handler_main.py @@ -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: