mbeedle-heroku-autoscale 0.2.5 → 0.2.6
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/lib/heroku/autoscale.rb +8 -9
- metadata +4 -4
data/lib/heroku/autoscale.rb
CHANGED
@@ -5,7 +5,7 @@ require "rack"
|
|
5
5
|
module Heroku
|
6
6
|
class Autoscale
|
7
7
|
|
8
|
-
VERSION = "0.2.
|
8
|
+
VERSION = "0.2.6"
|
9
9
|
|
10
10
|
attr_reader :app, :options, :last_scaled
|
11
11
|
|
@@ -17,15 +17,12 @@ module Heroku
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def call(env)
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
autoscale(env)
|
25
|
-
end
|
26
|
-
rescue
|
20
|
+
if options[:defer]
|
21
|
+
EventMachine.defer { autoscale(env) }
|
22
|
+
else
|
23
|
+
autoscale(env)
|
27
24
|
end
|
28
|
-
|
25
|
+
app.call(env)
|
29
26
|
end
|
30
27
|
|
31
28
|
private ######################################################################
|
@@ -45,6 +42,8 @@ private ######################################################################
|
|
45
42
|
dynos = 1 if dynos < 1
|
46
43
|
|
47
44
|
set_dynos(dynos) if dynos != original_dynos
|
45
|
+
rescue
|
46
|
+
nil
|
48
47
|
end
|
49
48
|
|
50
49
|
def check_options!
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mbeedle-heroku-autoscale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 6
|
10
|
+
version: 0.2.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Beedle
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-03 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|