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
fb3076d4
Commit
fb3076d4
authored
5 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
SW-657
: ignoring mom-opened tasks for now
parent
52d9043f
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/schedulechecker.py
+12
-12
12 additions, 12 deletions
...esourceAssignment/ResourceAssigner/lib/schedulechecker.py
with
12 additions
and
12 deletions
SAS/ResourceAssignment/ResourceAssigner/lib/schedulechecker.py
+
12
−
12
View file @
fb3076d4
...
@@ -212,26 +212,26 @@ class ScheduleChecker():
...
@@ -212,26 +212,26 @@ class ScheduleChecker():
mom_status
=
mom_details
[
mom_id
].
get
(
'
object_status
'
)
if
mom_id
in
mom_details
else
None
mom_status
=
mom_details
[
mom_id
].
get
(
'
object_status
'
)
if
mom_id
in
mom_details
else
None
if
(
mom_id
not
in
mom_details
or
if
(
mom_id
not
in
mom_details
or
mom_status
in
[
'
opened
'
,
'
described
'
,
'
suspended
'
]):
mom_status
in
[
'
opened
'
,
'
described
'
,
'
suspended
'
]):
logger
.
info
(
'
task %s mom_id=%s otdb_id=%s has radb_status=%s and mom_status=%s => remov
ing
task from radb
'
,
logger
.
warning
(
'
task %s mom_id=%s otdb_id=%s has radb_status=%s and mom_status=%s =>
Would normally
remov
e
task from radb
, ignoring for now
'
,
task
[
'
id
'
],
task
[
'
id
'
],
task
[
'
mom_id
'
],
task
[
'
mom_id
'
],
task
[
'
otdb_id
'
],
task
[
'
otdb_id
'
],
task
[
'
status
'
],
task
[
'
status
'
],
mom_status
)
mom_status
)
if
mom_status
in
[
'
opened
'
,
'
described
'
]:
#
if mom_status in ['opened', 'described']:
# auto delete data for tasks which went back to opened in mom (for pipeline restarts for example)
#
#
auto delete data for tasks which went back to opened in mom (for pipeline restarts for example)
# The reason to delete it here is because otherwise the cleanupservice tries to get it's info from an already deleted task in radb/otdb
#
#
The reason to delete it here is because otherwise the cleanupservice tries to get it's info from an already deleted task in radb/otdb
path_result
=
self
.
_curpc
.
getPathForOTDBId
(
task
[
'
otdb_id
'
])
#
path_result = self._curpc.getPathForOTDBId(task['otdb_id'])
if
path_result
[
'
found
'
]:
#
if path_result['found']:
logger
.
info
(
"
removing data on disk from previous run for otdb_id %s
"
,
task
[
'
otdb_id
'
])
#
logger.info("removing data on disk from previous run for otdb_id %s", task['otdb_id'])
result
=
self
.
_curpc
.
removeTaskData
(
task
[
'
otdb_id
'
])
#
result = self._curpc.removeTaskData(task['otdb_id'])
if
not
result
[
'
deleted
'
]:
#
if not result['deleted']:
logger
.
warning
(
"
could not remove all data on disk from previous run for otdb_id %s: %s
"
,
task
[
'
otdb_id
'
],
result
[
'
message
'
])
#
logger.warning("could not remove all data on disk from previous run for otdb_id %s: %s", task['otdb_id'], result['message'])
# delete the spec (and task/claims etc via cascading delete) from radb to get it in sync again with mom
#
#
delete the spec (and task/claims etc via cascading delete) from radb to get it in sync again with mom
self
.
_radbrpc
.
deleteSpecification
(
task
[
'
specification_id
'
])
#
self._radbrpc.deleteSpecification(task['specification_id'])
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
error
(
"
Error while checking unrun task mom_id=%s otdb_id=%s radb_id=%s for MoM opened/described/suspended status: %s
"
,
logger
.
error
(
"
Error while checking unrun task mom_id=%s otdb_id=%s radb_id=%s for MoM opened/described/suspended status: %s
"
,
task
[
'
mom_id
'
],
task
[
'
mom_id
'
],
...
...
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