mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-14 08:32:17 +03:00
task columns were reviewed
This commit is contained in:
parent
80579a1875
commit
9f9f16e5d5
1 changed files with 8 additions and 8 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue