How to get working with hirefire for delayed_job in rails 3 in development?

I am developing an app with rails 3 using delayed_jobs. I'm using Hirefire to scale up and down workers as and when needed. How can I get hirefire working in my development environment, to test it is working as it is intended to.

Then how should I also configure it so it also works in my production environment in Heroku Cedar stack.

Answers


What you need to do is to set the environment to :local. By default it is set to :noop which does nothing. To do this, create a initializer for hirefire at Rails.root/config/initializers/hirefire.rb. In the initializer, add the following

HireFire.configure do |config|
  if Rails.env.production?
    config.environment = :heroku
   else
    config.environment = :local
  end
  # add any other configuration you want here
end

Need Your Help

Show one or more elements and their content that have been hidden

javascript

I'm stuck and not sure how to move on. I want to be able to click a tab to reveal its content. With the code I currently have, when I click a single tab, it reveals the content for all the tabs. Bu...

Packet sniffing with Channel hopping in linux

linux wifi packet-capture packet-sniffers 802.11

I want to scan the WiFi on b/g interface, and I want to sniff packets on each channel, by spending 100 ms on each channel. One of the biggest requirements I have is not to store the packets I get (