diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c index b1f26216835a437035eb5f367822939205fb67ec..d6be7826f31dff98f3a11340e5e5d3b796fc8aa7 100644 --- a/src/plugins/sched/backfill/backfill.c +++ b/src/plugins/sched/backfill/backfill.c @@ -145,7 +145,6 @@ static int _attempt_backfill(void); static void _clear_job_start_times(void); static int _delta_tv(struct timeval *tv); static void _do_diag_stats(struct timeval *tv1, struct timeval *tv2); -static bool _job_is_completing(void); static bool _job_part_valid(struct job_record *job_ptr, struct part_record *part_ptr); static void _load_config(void); @@ -214,36 +213,6 @@ static void _dump_node_space_table(node_space_map_t *node_space_ptr) info("========================================="); } -/* - * _job_is_completing - Determine if jobs are in the process of completing. - * This is a variant of job_is_completing in slurmctld/job_scheduler.c. - * RET - True if any job is in the process of completing - */ -static bool _job_is_completing(void) -{ - bool completing = false; - ListIterator job_iterator; - struct job_record *job_ptr = NULL; - uint16_t complete_wait = slurm_get_complete_wait(); - time_t recent; - - if ((job_list == NULL) || (complete_wait == 0)) - return completing; - - recent = time(NULL) - MAX(complete_wait, 5); - job_iterator = list_iterator_create(job_list); - while ((job_ptr = (struct job_record *) list_next(job_iterator))) { - if (IS_JOB_COMPLETING(job_ptr) && - (job_ptr->end_time >= recent)) { - completing = true; - break; - } - } - list_iterator_destroy(job_iterator); - - return completing; -} - static void _set_job_time_limit(struct job_record *job_ptr, uint32_t new_limit) { job_ptr->time_limit = new_limit; @@ -724,7 +693,7 @@ extern void *backfill_agent(void *args) now = time(NULL); wait_time = difftime(now, last_backfill_time); if ((wait_time < backfill_interval) || - _job_is_completing() || _many_pending_rpcs() || + job_is_completing() || _many_pending_rpcs() || !avail_front_end(NULL) || !_more_work(last_backfill_time)) continue;