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
fc57fc60
Commit
fc57fc60
authored
8 years ago
by
Ruud Beukema
Browse files
Options
Downloads
Patches
Plain Diff
Task #10028: Fixed docstring
parent
74882498
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/ResourceAssignment/RATaskSpecifiedService/lib/RATaskSpecified.py
+8
-7
8 additions, 7 deletions
...eAssignment/RATaskSpecifiedService/lib/RATaskSpecified.py
with
8 additions
and
7 deletions
SAS/ResourceAssignment/RATaskSpecifiedService/lib/RATaskSpecified.py
+
8
−
7
View file @
fc57fc60
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
#
#
# $Id$
# $Id$
"""
"""
Daemon that listens to OTDB status changes
to PRESCHEDULED and SCHEDULED, requests
Daemon that listens to
specific
OTDB status changes
, requests the parset of such jobs including their predecessors, and
the parset of such jobs (+ their predecessors), and
posts them on the bus.
posts them on the bus.
"""
"""
from
lofar.messaging
import
FromBus
,
ToBus
,
EventMessage
# RPC,
from
lofar.messaging
import
FromBus
,
ToBus
,
EventMessage
# RPC,
...
@@ -198,6 +198,7 @@ def resourceIndicatorsFromParset( parsetDict ):
...
@@ -198,6 +198,7 @@ def resourceIndicatorsFromParset( parsetDict ):
return
subset
return
subset
class
RATaskSpecified
(
OTDBBusListener
):
class
RATaskSpecified
(
OTDBBusListener
):
def
__init__
(
self
,
def
__init__
(
self
,
otdb_notification_busname
=
DEFAULT_OTDB_NOTIFICATION_BUSNAME
,
otdb_notification_busname
=
DEFAULT_OTDB_NOTIFICATION_BUSNAME
,
...
@@ -254,23 +255,23 @@ class RATaskSpecified(OTDBBusListener):
...
@@ -254,23 +255,23 @@ class RATaskSpecified(OTDBBusListener):
otdb_id
=
id
otdb_id
=
id
else
:
else
:
logger
.
warning
(
"
Error in understanding id %s
"
,
id
)
logger
.
warning
(
"
Error in understanding id %s
"
,
id
)
logger
.
info
(
"
Processing OTDB ID %s
"
,
otdb_id
)
logger
.
info
(
"
Processing OTDB ID %s
"
,
otdb_id
)
result
=
{
"
otdb_id
"
:
otdb_id
,
"
predecessors
"
:
[]}
result
=
{
"
otdb_id
"
:
otdb_id
,
"
predecessors
"
:
[]}
if
state
:
if
state
:
result
[
"
state
"
]
=
state
# TODO should be status not state
result
[
"
state
"
]
=
state
# TODO should be status not state
else
:
else
:
pass
#otdbrpc.taskGetStatus not implemented and maybe not needed?
pass
#otdbrpc.taskGetStatus not implemented and maybe not needed?
if
otdb_id
in
found_parsets
:
if
otdb_id
in
found_parsets
:
parset
=
found_parsets
[
otdb_id
]
parset
=
found_parsets
[
otdb_id
]
else
:
else
:
parset
=
self
.
otdbrpc
.
taskGetSpecification
(
otdb_id
=
otdb_id
)[
'
specification
'
]
parset
=
self
.
otdbrpc
.
taskGetSpecification
(
otdb_id
=
otdb_id
)[
'
specification
'
]
found_parsets
[
otdb_id
]
=
parset
found_parsets
[
otdb_id
]
=
parset
logger
.
info
(
"
parset [%s]: %s
"
%
(
otdb_id
,
parset
))
logger
.
info
(
"
parset [%s]: %s
"
%
(
otdb_id
,
parset
))
result
[
'
specification
'
]
=
resourceIndicatorsFromParset
(
parset
)
result
[
'
specification
'
]
=
resourceIndicatorsFromParset
(
parset
)
key
=
PARSET_PREFIX
+
"
Observation.processSubtype
"
key
=
PARSET_PREFIX
+
"
Observation.processSubtype
"
result
[
'
task_type
'
],
result
[
'
task_subtype
'
]
=
convertSchedulerProcessSubtype
(
parset
.
get
(
key
,
""
))
result
[
'
task_type
'
],
result
[
'
task_subtype
'
]
=
convertSchedulerProcessSubtype
(
parset
.
get
(
key
,
""
))
...
...
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