Sha256: 479eafaed9a597f051047887d39379ae38ef1b6571fd010a1bee399b0b538253
Contents?: true
Size: 1.63 KB
Versions: 2
Compression:
Stored size: 1.63 KB
Contents
= Pipeline == Description Pipeline is a Rails plugin/gem to run asynchronous processes in a configurable pipeline. == Features * Execution of sequential user-defined stages in an asynchronous pipeline * Persistence of pipeline instances and stages * Error recovery strategies: * Irrecoverable errors fail the entire pipeline * Recoverable errors are automatically retried (using dj's exponential retry strategy) * Recoverable errors that require user input pause the pipeline for further retry * Cancelling of a paused pipeline == Installation Add the following lines to your config/environment.rb file: config.gem "pipeline", :version => ">= 0.0.2" Run the following: rake gems:install rake gems:unpack # Optional, if you want to vendor the gem script/generate pipeline # To generate the migration scripts that will store pipelines rake db:migrate You will also need to run your Delayed Job workers that will process the pipeline jobs in the background: rake jobs:work == Dependencies * Rails * Delayed job (http://github.com/collectiveidea/delayed_job/tree/master) == Usage Check <tt>examples</tt> for more examples (including error-recovery and cancelling) class Step1 < Pipeline::Stage::Base def perform puts("Started step 1") sleep 2 puts("Finished step 1") end end class Step2 < Pipeline::Stage::Base def perform puts("Started step 2") sleep 3 puts("Finished step 2") end end class TwoStepPipeline < Pipeline::Base define_stages Step1 >> Step2 end Pipeline.start(TwoStepPipeline.new) == Copyright Copyright (c) 2009 Danilo Sato. See LICENSE for details.
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
dtsato-pipeline-0.0.2 | README.rdoc |
pipeline-0.0.2 | README.rdoc |