diff --git a/pyslurm/core/job/job.pxd b/pyslurm/core/job/job.pxd index ab5e9197..ca256321 100644 --- a/pyslurm/core/job/job.pxd +++ b/pyslurm/core/job/job.pxd @@ -308,6 +308,8 @@ cdef class Job: Maximum CPU-Frequency requested. cpu_frequency_governor (Union[str, int]): CPU-Frequency Governor requested. + billable_tres (float): + Amount of billable trackable resources. wckey (str): Name of the WCKey this Job uses. mail_user (list): diff --git a/pyslurm/core/job/job.pyx b/pyslurm/core/job/job.pyx index f13a45cf..c23fa856 100644 --- a/pyslurm/core/job/job.pyx +++ b/pyslurm/core/job/job.pyx @@ -984,6 +984,13 @@ cdef class Job: # # TODO: Find out how it works # return cstr.to_unicode(self.ptr.tres_freq) + @property + def billable_tres(self): + if self.ptr.billable_tres == slurm.NO_VAL: + return 0.0 + + return self.ptr.billable_tres + @property def wckey(self): return cstr.to_unicode(self.ptr.wckey)