From 803eebd1584913d358d8acd4706a8359c16eda52 Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Fri, 15 Jan 2016 15:55:16 -0800
Subject: [PATCH] Minor streamlining of logging

No need to look up the Reason string for a job, we just set the value.
---
 src/slurmctld/job_scheduler.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c
index a8f1f49fc37..bd922d2d411 100644
--- a/src/slurmctld/job_scheduler.c
+++ b/src/slurmctld/job_scheduler.c
@@ -1410,11 +1410,10 @@ next_task:
 				job_ptr->state_reason = WAIT_PRIORITY;
 				xfree(job_ptr->state_desc);
 				debug3("sched: JobId=%u. State=PENDING. "
-				       "Reason=%s(Priority). Priority=%u, "
+				       "Reason=Priority. Priority=%u. "
 				       "Resv=%s.",
-				       job_ptr->job_id,
-				       job_reason_string(job_ptr->state_reason),
-				       job_ptr->priority, job_ptr->resv_name);
+				       job_ptr->job_id, job_ptr->priority,
+				       job_ptr->resv_name);
 				continue;
 			}
 		} else if (_failed_partition(job_ptr->part_ptr, failed_parts,
@@ -1423,11 +1422,9 @@ next_task:
 			xfree(job_ptr->state_desc);
 			last_job_update = now;
 			debug("sched: JobId=%u. State=PENDING. "
-			       "Reason=%s(Priority), Priority=%u, "
-			       "Partition=%s.",
-			       job_ptr->job_id,
-			       job_reason_string(job_ptr->state_reason),
-			       job_ptr->priority, job_ptr->partition);
+			       "Reason=Priority, Priority=%u. Partition=%s.",
+			       job_ptr->job_id, job_ptr->priority,
+			       job_ptr->partition);
 			continue;
 		}
 
-- 
GitLab