Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

job: add billable_tres attribute #344

Merged
merged 1 commit into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading