mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-10 11:12:16 +03:00
response message was opened
This commit is contained in:
parent
b857e5d15d
commit
5310354aaf
1 changed files with 4 additions and 3 deletions
|
@ -65,6 +65,8 @@ class Plugin(threading.Thread):
|
|||
self.context = Context()
|
||||
|
||||
def run(self):
|
||||
|
||||
|
||||
while self.keep_run:
|
||||
try:
|
||||
try:
|
||||
|
@ -77,11 +79,10 @@ class Plugin(threading.Thread):
|
|||
self.logger.debug('[Plugin] Executing task')
|
||||
command = Scope.getInstance().getPluginManager().findCommand(self.getName(), item_obj.get_command_cls_id().lower())
|
||||
command.handle_task(item_obj, self.context)
|
||||
# TODO create response message from context and item_obj. item_obj is task
|
||||
|
||||
response = Response(type=MessageType.TASK_STATUS.value, id=item_obj.get_id(), code=self.context.get('responseCode'), message=self.context.get('responseMessage'), data=self.context.get('responseData'), content_type=self.context.get('contentType'))
|
||||
# self.response_queue.put(self.messaging.response_msg(response)) #TODO DEBUG
|
||||
# Scope.getInstance().getMessager().send_direct_message(self.messaging.task_status_msg(response)) # TODO REMOVE
|
||||
Scope.getInstance().getMessager().send_direct_message(self.messaging.task_status_msg(response)) # TODO REMOVE
|
||||
|
||||
# Empty context for next use
|
||||
self.context.empty_data()
|
||||
|
@ -104,7 +105,7 @@ class Plugin(threading.Thread):
|
|||
|
||||
response = Response(type=MessageType.POLICY_STATUS.value, id=item_obj.get_id(), code=self.context.get('responseCode'), message=self.context.get('responseMessage'), data=self.context.get('responseData'), content_type=self.context.get('contentType'), execution_id=execution_id, policy_version=policy_ver)
|
||||
# self.response_queue.put(self.messaging.response_msg(response)) #TODO DEBUG
|
||||
# Scope.getInstance().getMessager().send_direct_message(self.messaging.policy_status_msg(response)) # TODO REMOVE
|
||||
Scope.getInstance().getMessager().send_direct_message(self.messaging.policy_status_msg(response)) # TODO REMOVE
|
||||
|
||||
# Empty context for next use
|
||||
self.context.empty_data()
|
||||
|
|
Loading…
Reference in a new issue