plugin listener activated and some minor bug fixing

This commit is contained in:
Volkan Şahin 2016-07-25 18:32:28 +03:00
parent 705565a416
commit a9cc40fb2f
2 changed files with 6 additions and 14 deletions

View file

@ -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()

View file

@ -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()
"""