Why double fork?
Well, to original fork didn’t work for me…
Merb fork of BackgrounDRb
Based on the 1.0.3 version of backgroundrb this is a hacked port to MERB. Some areas need tyding up but it works for all basic cases. Contributions welcome!
Installation
(1) Install gem provided in /pkg into your app's gem repository (which has to be named gems)
ex. #cd ~/path/to/app
#mkdir gems
#gem install ~/path/to/bdrb_merb.gem -i gems --no-ri --no-rdoc -l
(2) Add to config/init.rb (Merb):
require 'backgroundrb_merb'
(3) Create configuration file:
#rake bdrb:setup
Usage
Workers are created in app/workers
To create new worker:
merb-gen worker WorkerName
To start BackgroundRB:
rake bdrb:ctl:start
Control+C to stop
To run in background:
rake bdrb:ctl:daemonize
And to stop it:
rake bdrb:ctl:stop
BackgrounDRb
BackgrounDRb is a Ruby job server and scheduler. Its main intent is to be used with Ruby on Rails applications for offloading long-running tasks. Since a Rails application blocks while serving a request it is best to move long-running tasks off into a background process that is divorced from http request/response cycle.
This new release of BackgrounDRb is also modular and can be used without Rails so that any Ruby program or framework can use it.
Copyright © 2006 Ezra Zygmuntowicz,skaar[at]wasteorg, Copyright © 2007 Hemant Kumar (gethemant [at] gmail.com )
Usage
Please look into backgroundrb.rubyforge.org