heroku-scaler 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -6
- data/lib/heroku-scaler/config.rb +3 -2
- data/lib/heroku-scaler/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42219b5dab8fa6bcda9b8efa484d008379c324bc
|
4
|
+
data.tar.gz: a9a533d0feefe6928de876e55fcfdd2b3bfa6cfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40d0b155ee4e653872e94c84cec226a0d69d031c4eb3a343a9f6b778037bea280b8292011f2278d98df4e094f3944894f07609b098cba9b7bb3001893524678b
|
7
|
+
data.tar.gz: 81ca1f6ce0f69837868b286a5f4abf4d1f08c1d30e94944da678fb460ac9cf5004e92253eaa4fe8b89e502101effb047b64c90f907a47e373613396a68118c3d
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ The Heroku Scaler gem allows for free scaling of Heroku web dynos.
|
|
4
4
|
It exposes 3 simple rake tasks that can be called from the free [Heroku
|
5
5
|
Scheduler](https://elements.heroku.com/addons/scheduler).
|
6
6
|
|
7
|
-
This is perfect for applications that see heavy use during known times of the day or week. For example, we have some customers with business systems that see 99.9% of their traffic during regular business hours on the weekdays. Since Heroku charges for dynos based on the number of seconds the dynos are running, scaling down application dynos during off-peak times can mean big savings. Running your larger dyno setup during
|
7
|
+
This is perfect for applications that see heavy use during known times of the day or week. For example, we have some customers with business systems that see 99.9% of their traffic during regular business hours on the weekdays. Since Heroku charges for dynos based on the number of seconds the dynos are running, scaling down application dynos during off-peak times can mean big savings. Running your larger dyno setup only during business hours - which is only 25% of the time - can save a bundle! There are other tools that purport to do this but they often charge money and have, in our experience, been poorly supported.
|
8
8
|
|
9
9
|
## Commands
|
10
10
|
|
@@ -49,8 +49,9 @@ All of these configuration options can be set through the Heroku application con
|
|
49
49
|
bundle
|
50
50
|
```
|
51
51
|
|
52
|
-
|
53
|
-
|
52
|
+
1. Generate an API Key from an appropriate Heroku account ("Manage account" -> "API Key")
|
53
|
+
|
54
|
+
1. Add settings to your Heroku configuration.
|
54
55
|
|
55
56
|
Assuming a Heroku application named "my-cool-app":
|
56
57
|
|
@@ -58,14 +59,14 @@ All of these configuration options can be set through the Heroku application con
|
|
58
59
|
heroku config:set SCALE_APP_NAME=my-cool-app
|
59
60
|
heroku config:set SCALE_BIG_DYNO_COUNT=2
|
60
61
|
heroku config:set SCALE_BIG_DYNO_TYPE=Standard-1X
|
61
|
-
heroku config:set SCALE_OAUTH_TOKEN
|
62
|
+
heroku config:set SCALE_OAUTH_TOKEN=heroku_api_key_here
|
62
63
|
heroku config:set SCALE_SMALL_DYNO_COUNT=2
|
63
64
|
heroku config:set SCALE_SMALL_DYNO_TYPE=Standard-2X
|
64
65
|
```
|
65
|
-
|
66
|
+
1. Install the [Heroku
|
66
67
|
Scheduler](https://elements.heroku.com/addons/scheduler) into your Heroku application.
|
67
68
|
|
68
|
-
|
69
|
+
1. Add scheduled events at the times you wish for your application to scale up or down.
|
69
70
|
|
70
71
|
## Running tests
|
71
72
|
|
data/lib/heroku-scaler/config.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
module HerokuScaler
|
2
2
|
class Config
|
3
|
-
attr_reader :settings
|
4
|
-
|
5
3
|
def initialize(settings=ENV)
|
6
4
|
@settings=settings
|
7
5
|
end
|
@@ -29,5 +27,8 @@ module HerokuScaler
|
|
29
27
|
def auth_token
|
30
28
|
settings["SCALE_OAUTH_TOKEN"]
|
31
29
|
end
|
30
|
+
|
31
|
+
private
|
32
|
+
attr_reader :settings
|
32
33
|
end
|
33
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku-scaler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stirlingolson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform-api
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
80
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.
|
81
|
+
rubygems_version: 2.2.2
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: Heroku Scaler
|