Skip to content

Commit 04cea74

Browse files
committed
cleanup
1 parent aead35f commit 04cea74

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

backend/src/main/scala/cromwell/backend/standard/StandardAsyncExecutionActor.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -967,9 +967,9 @@ trait StandardAsyncExecutionActor
967967
* @param returnCode The return code.
968968
* @return True if the return code is for an abort.
969969
*/
970-
def isAbort(returnCode: Int): Boolean = returnCode == SIGINT || returnCode == SIGTERM || returnCode == SIGKILL
970+
def isAbortRc(returnCode: Int): Boolean = returnCode == SIGINT || returnCode == SIGTERM || returnCode == SIGKILL
971971

972-
def isOomKill(returnCode: Int): Boolean = returnCode == SIGKILL || returnCode == SIGCONTAINERKILL
972+
def isOomKillRc(returnCode: Int): Boolean = returnCode == SIGKILL || returnCode == SIGCONTAINERKILL
973973

974974
/**
975975
* Custom behavior to run after an abort signal is processed.
@@ -1441,9 +1441,9 @@ trait StandardAsyncExecutionActor
14411441
outOfMemoryDetected <- memoryRetryRC
14421442
} yield (stderrSize, returnCodeAsString, outOfMemoryDetected)
14431443

1444-
stderrSizeAndReturnCodeAndMemoryRetry flatMap { case (stderrSize, returnCodeAsString, stderrOomDetected) =>
1444+
stderrSizeAndReturnCodeAndMemoryRetry flatMap { case (stderrSize, returnCodeAsString, isStderrOomDetected) =>
14451445
val tryReturnCodeAsInt = Try(returnCodeAsString.trim.toInt)
1446-
def oomDetected(rc: Int): Boolean = isOomKill(rc) || stderrOomDetected
1446+
def isOomDetected(rc: Int): Boolean = isOomKillRc(rc) || isStderrOomDetected
14471447

14481448
if (isDone(status)) {
14491449
tryReturnCodeAsInt match {
@@ -1459,9 +1459,9 @@ trait StandardAsyncExecutionActor
14591459
handleExecutionSuccess(status, oldHandle, returnCodeAsInt)
14601460
// A job can receive a SIGKILL (137) if it was aborted or OOM killed. Abort must have been requested for this
14611461
// to actually be an abort.
1462-
case Success(returnCodeAsInt) if abortRequested && isAbort(returnCodeAsInt) =>
1462+
case Success(returnCodeAsInt) if abortRequested && isAbortRc(returnCodeAsInt) =>
14631463
Future.successful(AbortedExecutionHandle)
1464-
case Success(returnCodeAsInt) if oomDetected(returnCodeAsInt) && memoryRetryRequested =>
1464+
case Success(returnCodeAsInt) if memoryRetryRequested && isOomDetected(returnCodeAsInt) =>
14651465
val executionHandle = Future.successful(
14661466
FailedNonRetryableExecutionHandle(
14671467
RetryWithMoreMemory(jobDescriptor.key.tag, stderrAsOption, memoryRetryErrorKeys, log),
@@ -1470,7 +1470,7 @@ trait StandardAsyncExecutionActor
14701470
)
14711471
)
14721472
retryElseFail(executionHandle,
1473-
MemoryRetryResult(oomDetected(returnCodeAsInt), memoryRetryFactor, previousMemoryMultiplier)
1473+
MemoryRetryResult(isOomDetected(returnCodeAsInt), memoryRetryFactor, previousMemoryMultiplier)
14741474
)
14751475
case Success(returnCodeAsInt) =>
14761476
val executionHandle = Future.successful(
@@ -1491,7 +1491,7 @@ trait StandardAsyncExecutionActor
14911491
} else {
14921492
tryReturnCodeAsInt match {
14931493
case Success(returnCodeAsInt)
1494-
if oomDetected(returnCodeAsInt) && memoryRetryRequested && !continueOnReturnCode.continueFor(
1494+
if isOomDetected(returnCodeAsInt) && memoryRetryRequested && !continueOnReturnCode.continueFor(
14951495
returnCodeAsInt
14961496
) =>
14971497
val executionHandle = Future.successful(
@@ -1502,7 +1502,7 @@ trait StandardAsyncExecutionActor
15021502
)
15031503
)
15041504
retryElseFail(executionHandle,
1505-
MemoryRetryResult(oomDetected(returnCodeAsInt), memoryRetryFactor, previousMemoryMultiplier)
1505+
MemoryRetryResult(isOomDetected(returnCodeAsInt), memoryRetryFactor, previousMemoryMultiplier)
15061506
)
15071507
case _ =>
15081508
val failureStatus = handleExecutionFailure(status, tryReturnCodeAsInt.toOption)

0 commit comments

Comments
 (0)