heroku_dj_auto_scale 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.textile +0 -2
- data/lib/heroku_dj_auto_scale/version.rb +1 -1
- data/lib/heroku_dj_auto_scale.rb +9 -4
- metadata +4 -4
    
        data/README.textile
    CHANGED
    
    
    
        data/lib/heroku_dj_auto_scale.rb
    CHANGED
    
    | @@ -4,14 +4,19 @@ require 'delayed_job' | |
| 4 4 | 
             
            module HerokuDjAutoScale
         | 
| 5 5 | 
             
              module Scaler
         | 
| 6 6 | 
             
                class << self
         | 
| 7 | 
            -
                   | 
| 8 | 
            -
             | 
| 7 | 
            +
                  
         | 
| 8 | 
            +
                  def get_heroku
         | 
| 9 | 
            +
                    @heroku = Heroku::Client.new(ENV['HEROKU_USER'], ENV['HEROKU_PASS']) if ENV['USE_HEROKU_SCALING'] == 'true'
         | 
| 10 | 
            +
                  end
         | 
| 11 | 
            +
                    
         | 
| 9 12 | 
             
                  def workers
         | 
| 10 | 
            -
                     | 
| 13 | 
            +
                    get_heroku
         | 
| 14 | 
            +
                    ENV['USE_HEROKU_SCALING'] == 'true' ? @heroku.info(ENV['HEROKU_APP'])[:workers].to_i : 1
         | 
| 11 15 | 
             
                  end
         | 
| 12 16 |  | 
| 13 17 | 
             
                  def workers=(qty)
         | 
| 14 | 
            -
                     | 
| 18 | 
            +
                    get_heroku
         | 
| 19 | 
            +
                    @heroku.set_workers(ENV['HEROKU_APP'], qty) if ENV['USE_HEROKU_SCALING'] == 'true'
         | 
| 15 20 | 
             
                  end
         | 
| 16 21 |  | 
| 17 22 | 
             
                  def job_count
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: heroku_dj_auto_scale
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 17
         | 
| 5 5 | 
             
              prerelease: false
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 0
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.0. | 
| 9 | 
            +
              - 7
         | 
| 10 | 
            +
              version: 0.0.7
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Joel Basson
         | 
| @@ -15,7 +15,7 @@ autorequire: | |
| 15 15 | 
             
            bindir: bin
         | 
| 16 16 | 
             
            cert_chain: []
         | 
| 17 17 |  | 
| 18 | 
            -
            date: 2011-03- | 
| 18 | 
            +
            date: 2011-03-23 00:00:00 +02:00
         | 
| 19 19 | 
             
            default_executable: 
         | 
| 20 20 | 
             
            dependencies: 
         | 
| 21 21 | 
             
            - !ruby/object:Gem::Dependency 
         |