From d3fb3f194a6eb71ac39aa8e20c05eeaf5985dba4 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Tue, 19 Sep 2006 22:26:00 +0000
Subject: [PATCH] Don't consider a job inactive if it has any active steps.

---
 src/slurmctld/job_mgr.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c
index 57d84879cd3..956d11f4410 100644
--- a/src/slurmctld/job_mgr.c
+++ b/src/slurmctld/job_mgr.c
@@ -2450,6 +2450,11 @@ void job_time_limit(void)
 		if (job_ptr->job_state != JOB_RUNNING)
 			continue;
 
+		/* Consider a job active if it has any active steps */
+		if (job_ptr->step_list
+		&&  (list_count(job_ptr->step_list) > 0))
+			job_ptr->time_last_active = now;
+
 		if (slurmctld_conf.inactive_limit
 		&&  (job_ptr->time_last_active <= old)
 		&&  (job_ptr->part_ptr)
-- 
GitLab