Skip to content

Commit 110ca3e

Browse files
authored
WX-1341 Better logging when a runner stops picking up new workflows (#7246)
1 parent 74de9e3 commit 110ca3e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

engine/src/main/scala/cromwell/engine/workflow/WorkflowManagerActor.scala

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,16 @@ class WorkflowManagerActor(params: WorkflowManagerActorParams)
179179
params.jobExecutionTokenDispenserActor ! FetchLimitedGroups
180180
stay()
181181
case Event(ReplyLimitedGroups(groups), stateData) =>
182+
val wfCount = stateData.workflows.size
183+
val swfCount = stateData.subWorkflows.size
184+
val maxNewWorkflows = maxWorkflowsToLaunch min (maxWorkflowsRunning - wfCount - swfCount)
185+
val fetchCountLog = s"Fetching $maxNewWorkflows new workflows ($wfCount workflows and $swfCount subworkflows in flight)"
182186
if (groups.nonEmpty)
183-
log.info(s"Excluding groups from workflow launch: ${groups.mkString(", ")}")
187+
log.info(s"${fetchCountLog}, excluding groups: ${groups.mkString(", ")}")
188+
else if (maxNewWorkflows < 1)
189+
log.info(s"${fetchCountLog}, no groups excluded from workflow launch.")
184190
else
185-
log.debug("No groups excluded from workflow launch.")
186-
val maxNewWorkflows = maxWorkflowsToLaunch min (maxWorkflowsRunning - stateData.workflows.size - stateData.subWorkflows.size)
191+
log.debug(s"${fetchCountLog}, no groups excluded from workflow launch.")
187192
params.workflowStore ! WorkflowStoreActor.FetchRunnableWorkflows(maxNewWorkflows, excludedGroups = groups)
188193
stay()
189194
case Event(WorkflowStoreEngineActor.NoNewWorkflowsToStart, _) =>

0 commit comments

Comments
 (0)