Skip to content

Commit

Permalink
Default Flow runner timeout to Infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
lo5 committed Dec 18, 2015
1 parent 75a269c commit cd026d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
11 changes: 7 additions & 4 deletions scripts/run-flow.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ phantom.onError = (message, stacktrace) ->
printUsageAndExit = (message) ->
console.log "*** #{message} ***"
console.log 'Usage: phantomjs run-flow.js [--host ip:port] [--timeout seconds] --flow experiment.flow'
console.log ' --host ip:port of a running H2O cloud Defaults to localhost:54321'
console.log ' --timeout max allowed runtime Defaults to 3600'
console.log ' --host ip:port of a running H2O cloud Defaults to localhost:54321'
console.log ' --timeout max allowed runtime in seconds Defaults to forever'
phantom.exit 1

parseOpts = (args) ->
Expand All @@ -40,9 +40,12 @@ hostname = opts['--host'] ? 'localhost:54321'
console.log "Using host #{hostname}"

timeout = if timeoutArg = opts['--timeout']
1000 * parseInt timeoutArg, 10
timeoutSecs = parseInt timeoutArg, 10
if isNaN timeoutSecs
printUsageAndExit "Invalid --timeout: #{timeoutArg}"
1000 * timeoutSecs
else
3600000
Infinity

console.log "Using timeout #{timeout}ms"

Expand Down
8 changes: 4 additions & 4 deletions scripts/run-flow.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cd026d6

Please sign in to comment.