Merge pull request #1278 from broadinstitute/gvda-expose_queue_setting

Expose time between checks as CLI argument (Queue)
This commit is contained in:
Geraldine Van der Auwera 2016-01-28 11:00:36 -05:00
commit 1e4a98827c
2 changed files with 4 additions and 1 deletions

View File

@ -542,7 +542,7 @@ class QGraph extends Logging {
lastRunningCheck > 0 && nextRunningCheck(lastRunningCheck) <= 0
private def nextRunningCheck(lastRunningCheck: Long) =
((30 * 1000L) - (System.currentTimeMillis - lastRunningCheck))
((this.settings.time_between_checks.toLong * 1000L) - (System.currentTimeMillis - lastRunningCheck))
def formattedStatusCounts: String = {
"%d Pend, %d Run, %d Fail, %d Done".format(

View File

@ -55,6 +55,9 @@ class QGraphSettings {
@Argument(fullName="retry_failed", shortName="retry", doc="Retry the specified number of times after a command fails. Defaults to no retries.", required=false)
var retries = 0
@Argument(fullName="time_between_checks", shortName="tbc", doc="Seconds between checks of whether new jobs can be run. Default 30.", required=false)
var time_between_checks = 30.0
@Argument(fullName="start_from_scratch", shortName="startFromScratch", doc="Runs all command line functions even if the outputs were previously output successfully.", required=false)
var startFromScratch = false