Skip to content

Commit

Permalink
added example of using breakOnError
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelfj committed May 19, 2011
1 parent 1943167 commit 66bb7fb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions examples/breakOnError.coffee
@@ -0,0 +1,15 @@
poly = require '..'

jobs = poly.jobs()
sites = jobs.sites


sites.add 'site-1', 'all'

jobs.add 'job-1', 'all', -> this.shell.run "ls2", this.async()
jobs.add 'job-2', 'all', -> this.shell.run "ls", this.async()
jobs.add 'job-3', 'all', -> this.shell.run "ls", this.async()

jobs.runSequential ['job-1', 'job-2', 'job-3'], { breakOnError: true, log:true }, (err) ->
console.log err if err
console.log "done"

0 comments on commit 66bb7fb

Please sign in to comment.