Permalink
Browse files

added example of using breakOnError

  • Loading branch information...
1 parent 1943167 commit 66bb7fb1051834ad4aacffef9ede203063af6f40 @mikkelfj mikkelfj committed May 19, 2011
Showing with 15 additions and 0 deletions.
  1. +15 −0 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.