Seth,
I posted a bug about this exact issue here: http://backgroundrb.devjavu.com/ticket/103
, however you did the "right" thing and actually forked the code and
made the fix! Thanks for being a fixer versus just a complainer like
myself!
At any rate, Hemant, here's my +1 to this as well. Also, using
migrations this way will be really nice as we move to 1.0.5 and 1.0.6
and have more db changes!
Eric
On Sep 12, 2008, at 8:04 PM, Seth Morabito wrote:
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.
Regards,
-Seth
_______________________________________________
Backgroundrb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/backgroundrb-devel
-----------------------------------------------------
Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 |
http://www.opensourceconnections.com
_______________________________________________
Backgroundrb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/backgroundrb-devel