diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 7e7a5789b94f10649ab92d12fa3e2bf2c3d86a5a..ca70077511247a7b1652ece7fcf6280322f5cb32 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -6743,7 +6743,8 @@ extern void set_job_prio(struct job_record *job_ptr) return; job_ptr->priority = slurm_sched_initial_priority(lowest_prio, job_ptr); - if ((job_ptr->direct_set_prio) || + if ((job_ptr->priority == 0) || + (job_ptr->direct_set_prio) || (job_ptr->details && (job_ptr->details->nice != NICE_OFFSET))) return; @@ -8212,8 +8213,6 @@ int update_job(job_desc_msg_t * job_specs, uid_t uid) detail_ptr->begin_time = job_specs->begin_time; update_accounting = true; - if (detail_ptr->begin_time <= now) - set_job_prio(job_ptr); slurm_make_time_str(&detail_ptr->begin_time, time_str, sizeof(time_str)); info("sched: update_job: setting begin to %s for " @@ -8494,7 +8493,7 @@ fini: * based upon job submit order), recalculate the job priority, since * many factors of an update may affect priority considerations. * If job has a hold then do nothing */ - if ((error_code == SLURM_SUCCESS) && (job_ptr->priority > 1) && + if ((error_code == SLURM_SUCCESS) && (job_ptr->priority != 0) && strcmp(slurmctld_conf.priority_type, "priority/basic")) set_job_prio(job_ptr);