summaryrefslogtreecommitdiff
path: root/tango
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2015-03-16 16:13:36 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2015-03-16 16:36:29 +0100
commitabd0552e616af583b60d05b7ec2e4ef6090d694a (patch)
tree274f505bf31b82e8d62e804efa356fe67fddb12c /tango
parentd0c2ed950b03d1e16963d8e7a9eca2e39e08da0c (diff)
tango: return IDs of live jobs instead of count
Diffstat (limited to 'tango')
-rwxr-xr-xtango/Ufo6
1 files changed, 3 insertions, 3 deletions
diff --git a/tango/Ufo b/tango/Ufo
index b998af6..583e4ee 100755
--- a/tango/Ufo
+++ b/tango/Ufo
@@ -109,10 +109,10 @@ class ContinuousProcess(UfoProcess):
class Process(Device):
__metaclass__ = DeviceMeta
- jobs = attribute(label="Jobs", dtype=int,
+ jobs = attribute(label="Jobs", dtype=[int],
display_level=DispLevel.OPERATOR,
access=AttrWriteType.READ,
- doc="Number of running jobs")
+ doc="Job IDs of all running jobs")
json = attribute(label="JSON", dtype=str,
display_level=DispLevel.OPERATOR,
@@ -126,7 +126,7 @@ class Process(Device):
self.set_state(DevState.ON)
def read_jobs(self):
- return len([job for job in self._jobs.values() if job.is_alive()])
+ return [job_id for job_id, job in self._jobs.items() if job.is_alive()]
def read_json(self):
return self._json