Class: HerokuDelayedJobAutoscale::Manager::Local
- Inherits:
-
Object
- Object
- HerokuDelayedJobAutoscale::Manager::Local
- Defined in:
- lib/heroku_delayed_job_autoscale/managers/local.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Local
constructor
A new instance of Local.
- #qty ⇒ Object
- #scale_down ⇒ Object
- #scale_up ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Local
Returns a new instance of Local.
6 7 |
# File 'lib/heroku_delayed_job_autoscale/managers/local.rb', line 6 def initialize(={}) end |
Instance Method Details
#qty ⇒ Object
9 10 11 |
# File 'lib/heroku_delayed_job_autoscale/managers/local.rb', line 9 def qty ::Rush::Box.new.processes.filter(:cmdline => /rake jobs:work/).size end |
#scale_down ⇒ Object
17 18 19 |
# File 'lib/heroku_delayed_job_autoscale/managers/local.rb', line 17 def scale_down $exit = true end |
#scale_up ⇒ Object
13 14 15 |
# File 'lib/heroku_delayed_job_autoscale/managers/local.rb', line 13 def scale_up ::Rush::Box.new[Rails.root].bash "rake jobs:work", :background => true end |