Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KWH40
fml40-reference-implementation
Commits
e81ad455
Commit
e81ad455
authored
May 01, 2021
by
Jiahang Chen
Browse files
update joblist
parent
85f1954f
Pipeline
#458420
passed with stages
in 51 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ml/dt_factory.py
View file @
e81ad455
...
...
@@ -186,9 +186,12 @@ def build_sub_features(feature_ins, feature):
"""
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
:
sub_f_name
=
sub_f
.
get
(
"class"
,
""
)
sub_f_obj
=
DT_FACTORY
.
get
(
remove_namespace
(
sub_f_name
),
None
)
sub_f_name
=
sub_f
.
get
(
"name"
)
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
:
APP_LOGGER
.
critical
(
"Subfeature: %s is missing"
%
sub_f_name
)
else
:
...
...
ml/ml40/features/properties/values/documents/jobs/job_list.py
View file @
e81ad455
...
...
@@ -6,21 +6,3 @@ def __init__(self, name="", identifier=""):
super
().
__init__
(
name
=
name
,
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment