diff --git a/opt/ahenk/ahenkd.py b/opt/ahenk/ahenkd.py index 44b825f..3456899 100755 --- a/opt/ahenk/ahenkd.py +++ b/opt/ahenk/ahenkd.py @@ -124,13 +124,9 @@ class AhenkDeamon(BaseDaemon): try: while registration.is_registered() is False: - # while Scope.getInstance().getRegistration().is_registered() is False: max_attemp_number -= 1 logger.debug('[AhenkDeamon] Ahenk is not registered. Attempting for registration') - # TODO 'Could not reach Registration response from Lider. Be sure Lider is running and it is connected to XMPP server!' - registration.registration_request() - # Scope.getInstance().getRegistration().registration_request() if max_attemp_number < 0: logger.warning('[AhenkDeamon] Number of Attempting for registration is over') self.registration_failed() diff --git a/opt/ahenk/base/plugin/plugin_install_listener.py b/opt/ahenk/base/plugin/plugin_install_listener.py index a1c1c5a..47cc387 100644 --- a/opt/ahenk/base/plugin/plugin_install_listener.py +++ b/opt/ahenk/base/plugin/plugin_install_listener.py @@ -2,13 +2,13 @@ import os import signal import time -# from watchdog.events import FileSystemEventHandler -# from watchdog.observers import Observer +from watchdog.events import FileSystemEventHandler +from watchdog.observers import Observer from base.command.commander import Commander from base.system.system import System -""" + class FileEventHandler(FileSystemEventHandler): def __init__(self, plugin_path): self.path = plugin_path @@ -31,15 +31,12 @@ class FileEventHandler(FileSystemEventHandler): if event.is_directory: self.process(event) - def on_modified(self,event): - print("MODIFIED-"+str(event.src_path)) + # def on_modified(self, event): + # print("MODIFIED-" + str(event.src_path)) + -""" class PluginInstallListener: - def listen(self, path): - pass - """ observer = Observer() event_handler = FileEventHandler(path) observer.schedule(event_handler, path, recursive=False) @@ -50,4 +47,3 @@ class PluginInstallListener: except KeyboardInterrupt: observer.stop() observer.join() - """