heroku-qc-autoscale 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -1
- data/lib/autoscale/heroku.rb +6 -2
- data/lib/heroku-qc-autoscale/version.rb +1 -1
- data/lib/heroku-qc-autoscale.rb +1 -1
- data/test/autoscale_test.rb +4 -0
- data/test/test_helper.rb +1 -0
- metadata +4 -4
data/README.md
CHANGED
data/lib/autoscale/heroku.rb
CHANGED
@@ -26,8 +26,8 @@ module Autoscale
|
|
26
26
|
# shutdown if no jobs exist
|
27
27
|
def down
|
28
28
|
if job_count < 1
|
29
|
-
QC.log(action: :scale, workers:
|
30
|
-
self.workers =
|
29
|
+
QC.log(action: :scale, workers: min_workers)
|
30
|
+
self.workers = min_workers
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -52,6 +52,10 @@ module Autoscale
|
|
52
52
|
Autoscale.scale || [1, 15, 30, 40, 50]
|
53
53
|
end
|
54
54
|
|
55
|
+
def min_workers
|
56
|
+
Autoscale.min || 0
|
57
|
+
end
|
58
|
+
|
55
59
|
# heroku api client
|
56
60
|
def client
|
57
61
|
@@client ||= ::Heroku::API.new( params )
|
data/lib/heroku-qc-autoscale.rb
CHANGED
@@ -9,7 +9,7 @@ require "autoscale/queue_classic/callbacks"
|
|
9
9
|
require "heroku-qc-autoscale/version"
|
10
10
|
|
11
11
|
module Autoscale
|
12
|
-
mattr_accessor :api_key, :app, :mock, :scale
|
12
|
+
mattr_accessor :api_key, :app, :mock, :scale, :min
|
13
13
|
|
14
14
|
# config and activate QC bindings
|
15
15
|
def self.config(&block)
|
data/test/autoscale_test.rb
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku-qc-autoscale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: heroku-api
|
@@ -160,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
segments:
|
162
162
|
- 0
|
163
|
-
hash:
|
163
|
+
hash: 2325346798596805280
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
165
|
none: false
|
166
166
|
requirements:
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
segments:
|
171
171
|
- 0
|
172
|
-
hash:
|
172
|
+
hash: 2325346798596805280
|
173
173
|
requirements: []
|
174
174
|
rubyforge_project: heroku-qc-autoscale
|
175
175
|
rubygems_version: 1.8.21
|