meskyanichi/hirefire-resource — pull request #17 by adstage-david (2014-03-07 18:22:18+00:00)
Title: DynoList changes

Set of changes to allow configuring a longer list of dynos more easily and computing them more efficiently than running the macro once per dyno. Currently only supports sidekiq. It looks something like this:

```ruby
HireFire::Resource.configure do |config|
# Tell the HireFire resource you're using the sidekiq dyno list
config.dynos = :sidekiq

# With these calls, we'll only pull the stats from sidekiq once for all
# queues, then match them up to the configured dyno names
config.dyno(:fast, %w(mailers metrics))
config.dyno(:slow => [/generate_.+_report/, 'do_hard_work'])

# Note you can still configure jobs for other libraries if necessary:
config.dyno(:dj_worker) do
HireFire::Macro::Delayed::Job.queue(:encode, :compress)
end
end
```