Commit e81ad455 authored by Jiahang Chen's avatar Jiahang Chen
Browse files

update joblist

parent 85f1954f
Pipeline #458420 passed with stages
in 51 seconds
...@@ -186,9 +186,12 @@ def build_sub_features(feature_ins, feature): ...@@ -186,9 +186,12 @@ def build_sub_features(feature_ins, feature):
""" """
sub_features = feature.get("subFeatures", []) sub_features = feature.get("subFeatures", [])
### Because of the uniqueness of subfeatures, like ml40::JobList can have many fml40::ForwardingJob in subFeatures
for sub_f in sub_features: for sub_f in sub_features:
sub_f_name = sub_f.get("class", "") sub_f_name = sub_f.get("name")
sub_f_obj = DT_FACTORY.get(remove_namespace(sub_f_name), None) if sub_f_name is None:
sub_f_name = sub_f.get("class", "")
sub_f_obj = DT_FACTORY.get(remove_namespace(sub_f.get("class", "")), None)
if sub_f_obj is None: if sub_f_obj is None:
APP_LOGGER.critical("Subfeature: %s is missing" % sub_f_name) APP_LOGGER.critical("Subfeature: %s is missing" % sub_f_name)
else: else:
......
...@@ -6,21 +6,3 @@ def __init__(self, name="", identifier=""): ...@@ -6,21 +6,3 @@ def __init__(self, name="", identifier=""):
super().__init__( super().__init__(
name=name, name=name,
identifier=identifier) identifier=identifier)
self.__jobs = list()
self.__json_out = dict()
@property
def jobs(self):
return self.__jobs
@jobs.setter
def jobs(self, value):
self.__jobs = value
def to_json(self):
self.__json_out = super().to_json()
if self.jobs:
self.__json_out["jobs"] = list()
for job in self.jobs:
self.__json_out["jobs"].append(job.to_json())
return self.__json_out
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment