Mason Hale
2006-Dec-14 18:06 UTC
[Backgroundrb-devel] feature request: config option to toggle scheduled jobs based on environment
I have BackgrounDRb configured to handle two cases of long-running tasks: (1) on-demand user triggered requests for some action, and (2) scheduled background running of tasks on a predetermined schedule. In my particular case, we have a publication task that can take several minutes to perform. Users can setup a regular publication schedule, or can hit a ''publish now'' button to start a process immediately. The challenge I have is that in development mode, I want to be able to fire off the ''publish now'' tasks (for testing), but do NOT want the scheduled background tasks to run automatically. I want to do this in a way that works with multiple developers and that does not complicate deployment. The ideal for me would be some flag I could set that tells BackgroundRB not to run it''s scheduled tasks, and have that flag automatically set based on the current RAILS_ENV. This would be similar to the way ActionMailer works, where I have a line: config.action_mailer.perform_deliveries = false in my config/environments/development.rb file and a line: config.action_mailer.perform_deliveries = true in my config/environments/production.rb file. So something like: config.backgroundrb.enable_scheduler = false or config.backgroundrb.run_scheduled_tasks = false would be awesome. I can probably hack something into my copy of the BackgrounDRb code to make this work for my needs, but I wanted to through it out there as a feature request as well. best regards, Mason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20061214/7ed7809d/attachment.html