Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
74f0f721
"README" did not exist on "ad8260dc70299ff4ebbe9c975949a0c365622ba6"
Commit
74f0f721
authored
8 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
Task #9607: logging in processPredecessors
parent
76a0b317
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/ResourceAssignment/ResourceAssigner/lib/assignment.py
+19
-6
19 additions, 6 deletions
SAS/ResourceAssignment/ResourceAssigner/lib/assignment.py
with
19 additions
and
6 deletions
SAS/ResourceAssignment/ResourceAssigner/lib/assignment.py
+
19
−
6
View file @
74f0f721
...
@@ -215,14 +215,27 @@ class ResourceAssigner():
...
@@ -215,14 +215,27 @@ class ResourceAssigner():
if
predecessor_trees
:
if
predecessor_trees
:
otdb_id
=
specification_tree
[
'
otdb_id
'
]
otdb_id
=
specification_tree
[
'
otdb_id
'
]
pred_otdb_ids
=
[
pt
[
'
otdb_id
'
]
for
pt
in
predecessor_trees
]
logger
.
info
(
'
proccessing predecessors otdb_ids=%s for otdb_id=%s
'
,
pred_otdb_ids
,
otdb_id
)
task
=
self
.
radbrpc
.
getTask
(
otdb_id
=
otdb_id
)
task
=
self
.
radbrpc
.
getTask
(
otdb_id
=
otdb_id
)
for
predecessor_tree
in
predecessor_trees
:
if
task
:
pred_otdb_id
=
predecessor_tree
[
'
otdb_id
'
]
for
predecessor_tree
in
predecessor_trees
:
predecessor_task
=
self
.
radbrpc
.
getTask
(
otdb_id
=
pred_otdb_id
)
#first process the predecessor's predecessors
if
predecessor_task
and
predecessor_task
[
'
id
'
]
not
in
task
[
'
predecessor_ids
'
]:
self
.
processPredecessors
(
predecessor_tree
)
self
.
radbrpc
.
insertTaskPredecessor
(
task
[
'
id
'
],
predecessor_task
[
'
id
'
])
self
.
processPredecessors
(
predecessor_tree
)
#then check if the predecessor needs to be linked to this task
pred_otdb_id
=
predecessor_tree
[
'
otdb_id
'
]
predecessor_task
=
self
.
radbrpc
.
getTask
(
otdb_id
=
pred_otdb_id
)
if
predecessor_task
:
if
predecessor_task
[
'
id
'
]
not
in
task
[
'
predecessor_ids
'
]:
logger
.
info
(
'
connecting predecessor task with otdb_id=%s to it
\'
s successor with otdb_id=%s
'
,
pred_otdb_id
,
otdb_id
)
self
.
radbrpc
.
insertTaskPredecessor
(
task
[
'
id
'
],
predecessor_task
[
'
id
'
])
else
:
logger
.
warning
(
'
could not find predecessor task with otdb_id=%s in radb for task otdb_id=%s
'
,
pred_otdb_id
,
otdb_id
)
else
:
logger
.
info
(
'
no predecessors for otdb_id=%s
'
,
specification_tree
[
'
otdb_id
'
])
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
error
(
e
)
logger
.
error
(
e
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment