flux.job.stats module

class flux.job.stats.JobStats(handle)

Bases: object

Container for job statistics as returned by job-list.job-stats

depend

Count of jobs current in DEPEND state

priority

Count of jobs in PRIORITY state

sched

Count of jobs in SCHED state

run

Count of jobs in RUN state

cleanup

Count of jobs in CLEANUP state

inactive

Count of INACTIVE jobs

active

Total number of active jobs (all states but INACTIVE)

failed

Total number of jobs that did not exit with zero status

successful

Total number of jobs completed with zero exit code

canceled

Total number of jobs that were canceled

timeout

Total number of jobs that timed out

pending

Sum of "depend", "priority", and "sched"

running

Sum of "run" and "cleanup"

update(callback=None, **kwargs)

Asynchronously fetch job statistics and update this object.

Requires that the reactor for this handle be running in order to process the result.

Parameters:
  • callback -- Optional: a callback to call when asynchronous update is complete.
  • kwargs -- Optional: extra keyword arguments to pass to callback()
update_sync()

Synchronously update job statistics