Skip to content

Commit

Permalink
job: add billable_tres attribute (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
tazend committed Jul 6, 2024
1 parent fdd2fac commit 595fdd0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyslurm/core/job/job.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
7 changes: 7 additions & 0 deletions pyslurm/core/job/job.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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 == <double>slurm.NO_VAL:
return 0.0

return self.ptr.billable_tres

@property
def wckey(self):
return cstr.to_unicode(self.ptr.wckey)
Expand Down

0 comments on commit 595fdd0

Please sign in to comment.