Skip to content

Commit

Permalink
tango: return IDs of live jobs instead of count
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Vogelgesang committed Mar 16, 2015
1 parent d0c2ed9 commit abd0552
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tango/Ufo
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit abd0552

Please sign in to comment.