From 2942df2ff025676fb58c871ff38ed94d541c55e9 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Wed, 15 Jul 2009 23:52:09 +0000 Subject: [PATCH] clear job suspend time values when requeued to avoid showing suspend times accumulated prior to a job requeue/restart --- src/slurmctld/job_mgr.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 98f081e48d1..8983a8edaca 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -6546,11 +6546,6 @@ extern int job_requeue (uid_t uid, uint32_t job_id, slurm_fd conn_fd) goto reply; } - /* reset the priority */ - _set_job_prio(job_ptr); - slurm_sched_requeue(job_ptr, "Job requeued by user/admin"); - last_job_update = now; - /* nothing else to do if pending */ if (IS_JOB_PENDING(job_ptr)) goto reply; @@ -6567,6 +6562,11 @@ extern int job_requeue (uid_t uid, uint32_t job_id, slurm_fd conn_fd) goto reply; } + /* reset the priority */ + _set_job_prio(job_ptr); + slurm_sched_requeue(job_ptr, "Job requeued by user/admin"); + last_job_update = now; + if (IS_JOB_SUSPENDED(job_ptr)) { enum job_states suspend_job_state = job_ptr->job_state; /* we can't have it as suspended when we call the @@ -6597,6 +6597,9 @@ extern int job_requeue (uid_t uid, uint32_t job_id, slurm_fd conn_fd) job_ptr->job_state |= JOB_COMPLETING; job_ptr->details->submit_time = now; + job_ptr->pre_sus_time = (time_t) 0; + job_ptr->suspend_time = (time_t) 0; + job_ptr->tot_sus_time = (time_t) 0; job_ptr->restart_cnt++; /* Since the job completion logger removes the submit we need to add it again. -- GitLab