Skip to content

luis-ca/pipeline

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipeline is a Rails plugin/gem to run asynchronous processes in a configurable pipeline.

Add the following lines to your config/environment.rb file:

config.gem "dtsato-pipeline", :version => ">= 0.0.1", :source => "http://gems.github.com"

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
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 © 2009 Danilo Sato. See LICENSE for details.

About

A Rails plugin/gem to run asynchronous processes in a configurable pipeline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors