-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added configuration option for abortJobsOnTerminate. Added support for server mode. SingleWorkflowRunnerActor now uses the internal state to determine whether the workflow is done (and not a separately maintained flag). Added configuration option for abortJobsOnTerminate. Added support for server mode. SingleWorkflowRunnerActor now uses the internal state to determine whether the workflow is done (and not a separately maintained flag).
- Loading branch information
1 parent
c4e4b45
commit 8a48eee
Showing
3 changed files
with
50 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
package cromwell.engine | ||
|
||
import akka.util.Timeout | ||
import com.typesafe.config.{ConfigException, ConfigFactory} | ||
|
||
import scala.concurrent.duration._ | ||
import scala.language.postfixOps | ||
|
||
trait CromwellActor { | ||
protected implicit val timeout = Timeout(5 seconds) | ||
|
||
/** | ||
* Retrieves the configuration option that determines whether this actor should abort all jobs if it receives | ||
* a shutdown hook. | ||
* @return - The value of the configuration option, or 'false' if the option isn't specified. | ||
*/ | ||
def getAbortJobsOnTerminate: Boolean = { | ||
val config=ConfigFactory.load.getConfig("backend") | ||
try { | ||
config.getBoolean("abortJobsOnTerminate") | ||
} catch { | ||
case _:ConfigException => false | ||
} | ||
} | ||
|
||
} |
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
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