[Backgroundrb-devel] Patch submission for BackgrounDRb

Seth Morabito seth at glyde.com
Fri Sep 12 20:04:48 EDT 2008

Hello Hemant, and others!
Our team here has been using BackgrounDRb with great success, it's been very
useful for us!  We're using release version 1.0.3, but we're interested in
moving to the git version for the new persistent job queues, which I've been
playing around with.

We prefer to keep all of our database changes checked into our source
repository as migrations, so we have some concerns about how the current git
version of backgroundrb creates the queue table through a rake task.  I've
made a fork of the project on github with a couple of small changes to this,
and I'd like to ask you to review them, if you're interested.  The fork is
here:  http://github.com/sethm/backgroundrb/tree/master

The changes I've made do the following:

* Added a generator that produces a db migration for the queue database
table.  The generator is run with "./script/generate bdrb_migration".  It
takes an optional argument, which is passed to the generator as the name to
use for the migration class, either CamelCase or snake_case.  For example,
"./script/generate bdrb_migration MakeQueueDb" will create the file
"./db/migrate/20080912164900_make_queue_db.rb".  The default name for the
migration class is "CreateBackgroundrbQueueTable".

* Added a rake task that can be used to call the generator, if desired.
"rake backgroundrb:queue_migration"

* Removed the queue table creation from the "backgroundrb:setup" rake task.
 Changed it so that it calls the migration generator instead.  This means
anyone using the plugin will need to do a rake "db:migrate" before they can
start using persistent queues.

I'd love feedback on these changes.  The migration would be very useful for
us -- but would anyone else find it helpful?  I'm perfectly happy to make
changes or enhancements.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080912/a03146fc/attachment.html>

More information about the Backgroundrb-devel mailing list