Skip to content

Commit

Permalink
changed the environment variable that was used to retrieve the app's …
Browse files Browse the repository at this point in the history
…name back to APP_NAME. Make sure that you have set this variable using heroku config:add APP_NAME=my_awesome_app
  • Loading branch information
mugwump committed Mar 14, 2012
1 parent 58900d8 commit 07bc7c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hirefire/environment/heroku.rb
Expand Up @@ -27,14 +27,14 @@ def workers(amount = nil)
# workers that are currently running on Heroku
if amount.nil?
# return client.info(ENV['APP_NAME'])[:workers].to_i
return client.ps(ENV['NEW_RELIC_APP_NAME']).select {|p| p['process'] =~ /worker.[0-9]+/}.length
return client.ps(ENV['APP_NAME']).select {|p| p['process'] =~ /worker.[0-9]+/}.length
end

##
# Sets the amount of Delayed Job
# workers that need to be running on Heroku
#client.set_workers(ENV['APP_NAME'], amount)
return client.ps_scale(ENV['NEW_RELIC_APP_NAME'], {"type" => "worker", "qty" => amount})
return client.ps_scale(ENV['APP_NAME'], {"type" => "worker", "qty" => amount})

rescue RestClient::Exception
# Heroku library uses rest-client, currently, and it is quite
Expand Down

0 comments on commit 07bc7c6

Please sign in to comment.