task columns were reviewed

This commit is contained in:
Volkan Şahin 2016-05-06 16:44:21 +03:00
parent 80579a1875
commit 9f9f16e5d5

View file

@ -1,9 +1,10 @@
#!/usr/bin/python3 #!/usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com> # Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
from base.model.enum.MessageFactory import MessageFactory
from base.Scope import Scope from base.Scope import Scope
from base.model.MessageFactory import MessageFactory from base.model.enum.MessageType import MessageType
from base.model.MessageType import MessageType
class TaskManager(object): class TaskManager(object):
@ -35,18 +36,17 @@ class TaskManager(object):
def addPolicy(self, policy): def addPolicy(self, policy):
try: try:
print("adding policy")
self.pluginManager.processPolicy(policy) self.pluginManager.processPolicy(policy)
except Exception as e: except Exception as e:
self.logger.error("Exception occured when adding policy ") self.logger.error("Exception occured when adding policy ")
pass pass
def saveTask(self, task): def saveTask(self, task):
pass
#cols = ['id', 'create_date', 'modify_date', 'command_cls_id', 'parameter_map', 'deleted', 'plugin'] cols = ['id', 'create_date', 'modify_date', 'command_cls_id', 'parameter_map', 'deleted', 'plugin']
#values = [str(task.id), str(task.create_date), str(task.modify_date), str(task.command_cls_id), str(task.parameter_map), str(task.deleted), task.plugin.to_string()] values = [str(task.get_id()), str(task.get_create_date()), str(task.get_modify_date()), str(task.get_command_cls_id()), str(task.get_parameter_map()), str(task.get_deleted()), task.plugin.to_string()]
#self.db_service.update('task', cols, values, None) self.db_service.update('task', cols, values, None)
#self.logger.debug('[TaskManager] Task has been saved to database (Task id:' + task.id + ')') self.logger.debug('[TaskManager] Task has been saved to database (Task id:' + task.id + ')')
def updateTask(self, task): def updateTask(self, task):
# TODO not implemented yet # TODO not implemented yet