-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
9db0661
commit 0e21d72
Showing
4 changed files
with
91 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
backend/src/main/scala/cromwell/backend/standard/retry/memory/MemoryRetryResult.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cromwell.backend.standard.retry.memory | ||
|
||
import common.validation.Validation.MemoryRetryMultiplierRefined | ||
|
||
/** | ||
* Result of evaluating an attempt as a memory-retry candidate, encapsulating instructions | ||
* for configuring the next attempt if applicable. | ||
* | ||
* @param oomDetected Did the previous attempt OOM? | ||
* @param factor User-configured factor | ||
* @param previousMultiplier Multiplier used for the previous attempt | ||
*/ | ||
case class MemoryRetryResult(oomDetected: Boolean, | ||
factor: Option[MemoryRetryMultiplierRefined], | ||
previousMultiplier: Option[Double] | ||
) | ||
|
||
case object MemoryRetryResult { | ||
def none: MemoryRetryResult = MemoryRetryResult(oomDetected = false, None, None) | ||
} |
16 changes: 16 additions & 0 deletions
16
...lines/common/src/main/scala/cromwell/backend/google/pipelines/common/errors/package.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package cromwell.backend.google.pipelines.common | ||
|
||
package object errors { | ||
|
||
private def quotaMessages = List( | ||
"A resource limit has delayed the operation", | ||
"usage too high", | ||
"no available zones", | ||
"resource_exhausted", | ||
"quota too low" | ||
) | ||
|
||
def isQuotaMessage(msg: String): Boolean = | ||
quotaMessages.exists(msg.contains) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters