mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-25 22:52:24 +03:00
minor bug fixes
This commit is contained in:
parent
885be4972d
commit
4008aae6e6
4 changed files with 3 additions and 6 deletions
|
@ -66,7 +66,7 @@ class Scope(object):
|
|||
self.pluginManager = pluginManager
|
||||
|
||||
def getTaskManager(self):
|
||||
return self.TaskManager
|
||||
return self.taskManager
|
||||
|
||||
def setTaskManager(self,taskManager):
|
||||
self.taskManager = taskManager
|
||||
|
|
|
@ -20,14 +20,13 @@ class ExecutionManager(object):
|
|||
self.task_manager = scope.getTaskManager()
|
||||
self.logger=scope.getLogger()
|
||||
|
||||
self.event_manager.register_event('EXECUTE_TASK',self.execute_task)
|
||||
self.event_manager.register_event('EXECUTE_SCRIPT',self.execute_script)
|
||||
self.event_manager.register_event('REQUEST_FILE',self.request_file)
|
||||
self.event_manager.register_event('MOVE_FILE',self.move_file)
|
||||
self.event_manager.register_event('TASK',self.add_task)
|
||||
|
||||
def add_task(self,arg):
|
||||
self.logger.debug('[ExecutionManager] Executing task...')
|
||||
self.logger.debug('[ExecutionManager] Adding new task...')
|
||||
task = Task(arg)
|
||||
self.task_manager.addTask(task)
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@ class MessageFactory(object):
|
|||
return "Message receivden response"
|
||||
elif type == MessageType.TASK_PROCESSING:
|
||||
return "Message processing response"
|
||||
else
|
||||
else:
|
||||
return None
|
||||
createMessage = staticmethod(createMessage)
|
||||
|
|
|
@ -7,9 +7,7 @@ class Task(object):
|
|||
"""docstring for Task"""
|
||||
def __init__(self,message):
|
||||
self.payload = json.loads(message)
|
||||
print(self.payload)
|
||||
self.request = self.payload['request']
|
||||
print(self.request)
|
||||
|
||||
@property
|
||||
def task_id(self):
|
||||
|
|
Loading…
Reference in a new issue