Changes
This commit is contained in:
parent
567d57a818
commit
a5fc76d081
|
@ -87,7 +87,7 @@ class DataJob(SpecObject):
|
||||||
|
|
||||||
def __save_data_job_log(self):
|
def __save_data_job_log(self):
|
||||||
"""保存数据任务日志"""
|
"""保存数据任务日志"""
|
||||||
data = self.fields_toggle(fields=["数据任务名称", "数据任务类型", "数据任务状态", "数据任务详情", "任务处理时间"])
|
data = self.fields_toggle(fields=["title", "job_type", "status", "detail", "log_time"])
|
||||||
DB_GUA.insert_single_data("日志", "数据处理任务日志", data)
|
DB_GUA.insert_single_data("日志", "数据处理任务日志", data)
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
|
|
@ -10,6 +10,9 @@ class SpecObject(object):
|
||||||
_dict_ = dict()
|
_dict_ = dict()
|
||||||
default_types = ['str', 'int', 'float', 'dict', 'bool', 'tuple']
|
default_types = ['str', 'int', 'float', 'dict', 'bool', 'tuple']
|
||||||
|
|
||||||
|
if 'fields' in kwargs:
|
||||||
|
self.__dict__ = {key: self.__dict__[key] for key in kwargs['fields']}
|
||||||
|
|
||||||
for key in self.__dict__.keys():
|
for key in self.__dict__.keys():
|
||||||
if key in self.fields_map.keys():
|
if key in self.fields_map.keys():
|
||||||
|
|
||||||
|
@ -34,9 +37,6 @@ class SpecObject(object):
|
||||||
else:
|
else:
|
||||||
_dict_[self.fields_map[key]] = self.__dict__[key].fields_toggle()
|
_dict_[self.fields_map[key]] = self.__dict__[key].fields_toggle()
|
||||||
|
|
||||||
if 'fields' in kwargs:
|
|
||||||
_dict_ = {key: _dict_[key] for key in kwargs['fields']}
|
|
||||||
|
|
||||||
return _dict_
|
return _dict_
|
||||||
|
|
||||||
def set_instance(self, **kwargs):
|
def set_instance(self, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue