Skip to content

Commit

Permalink
Merge pull request #3 from ucb-rit/partitions-fix
Browse files Browse the repository at this point in the history
Partitions fix
  • Loading branch information
nicolaschan authored Dec 9, 2020
2 parents fb7a117 + 4c7ca3e commit b0d6424
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion job_completion_plugin/src/jobcomp_bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub extern "C" fn slurm_jobcomp_log_record(job_ptr: *const job_record) -> u32 {
Some(account) => account,
None => return ESLURM_INVALID_ACCOUNT,
};
let partition: String = match safe_helpers::deref_cstr(unsafe { (*job_ptr).partition }) {
let partition: String = match safe_helpers::deref_cstr(unsafe { (*(*job_ptr).part_ptr).name }) {
Some(partition) => partition,
None => return ESLURM_INVALID_PARTITION_NAME,
};
Expand Down
30 changes: 15 additions & 15 deletions slurm_banking/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ fn display_option<T: std::fmt::Debug>(option: &Option<T>) -> String {
pub fn display_job_record(job_record: &openapi::models::Job) -> String {
format!(
"jobslurmid: {jobslurmid}, \
submitdate: {submitdate}, \
startdate: {startdate}, \
enddate: {enddate}, \
userid: {userid}, \
accountid: {accountid}, \
amount: {amount}, \
jobstatus: {jobstatus}, \
partition: {partition}, \
qos: {qos}, \
nodes: {nodes}, \
num_cpus: {num_cpus}, \
num_req_nodes: {num_req_nodes}, \
num_alloc_nodes: {num_alloc_nodes}, \
raw_time: {raw_time}, \
cpu_time: {cpu_time}",
submitdate: {submitdate}, \
startdate: {startdate}, \
enddate: {enddate}, \
userid: {userid}, \
accountid: {accountid}, \
amount: {amount}, \
jobstatus: {jobstatus}, \
partition: {partition}, \
qos: {qos}, \
nodes: {nodes}, \
num_cpus: {num_cpus}, \
num_req_nodes: {num_req_nodes}, \
num_alloc_nodes: {num_alloc_nodes}, \
raw_time: {raw_time}, \
cpu_time: {cpu_time}",
jobslurmid = job_record.jobslurmid,
submitdate = display_option(&job_record.submitdate),
startdate = display_option(&job_record.startdate),
Expand Down

0 comments on commit b0d6424

Please sign in to comment.