dynomatic 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +76 -0
- data/LICENSE.txt +21 -0
- data/README.md +126 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/dynomatic.gemspec +33 -0
- data/lib/dynomatic.rb +22 -0
- data/lib/dynomatic/adapters.rb +18 -0
- data/lib/dynomatic/adapters/delayed_job.rb +9 -0
- data/lib/dynomatic/configuration.rb +9 -0
- data/lib/dynomatic/hobby_scaler.rb +23 -0
- data/lib/dynomatic/master.rb +56 -0
- data/lib/dynomatic/scaler.rb +32 -0
- data/lib/dynomatic/version.rb +3 -0
- metadata +175 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 171c4347b0535537b19ec7138c29d234401b97a4
|
4
|
+
data.tar.gz: aef7a01fe6eb21928d1b8c2f31c5e5ebec060c03
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0d027ba8438005b550f4c2e5d0456a1feb14bb821bc5755cfa0f4ca7247af035f48247cf14b20128315d08dff61354f41801250163b1094c81aa69f5a1ce293d
|
7
|
+
data.tar.gz: bd5cf41e57fb11a320abb53d23b8705c52ae30d58c015c292a02783911ee2fc441c01ac5eb9560d87c96b1e6354a1ce95c6cc8df8a2031e1651fd09a32cda9f3
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
dynomatic (0.1.0)
|
5
|
+
activejob
|
6
|
+
activesupport
|
7
|
+
platform-api
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activejob (5.1.4)
|
13
|
+
activesupport (= 5.1.4)
|
14
|
+
globalid (>= 0.3.6)
|
15
|
+
activesupport (5.1.4)
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
+
i18n (~> 0.7)
|
18
|
+
minitest (~> 5.1)
|
19
|
+
tzinfo (~> 1.1)
|
20
|
+
coderay (1.1.2)
|
21
|
+
concurrent-ruby (1.0.5)
|
22
|
+
delayed_job (4.1.4)
|
23
|
+
activesupport (>= 3.0, < 5.2)
|
24
|
+
diff-lcs (1.3)
|
25
|
+
erubis (2.7.0)
|
26
|
+
excon (0.60.0)
|
27
|
+
globalid (0.4.1)
|
28
|
+
activesupport (>= 4.2.0)
|
29
|
+
heroics (0.0.24)
|
30
|
+
erubis (~> 2.0)
|
31
|
+
excon
|
32
|
+
moneta
|
33
|
+
multi_json (>= 1.9.2)
|
34
|
+
i18n (0.9.1)
|
35
|
+
concurrent-ruby (~> 1.0)
|
36
|
+
method_source (0.9.0)
|
37
|
+
minitest (5.11.1)
|
38
|
+
moneta (0.8.1)
|
39
|
+
multi_json (1.13.1)
|
40
|
+
platform-api (2.1.0)
|
41
|
+
heroics (~> 0.0.23)
|
42
|
+
moneta (~> 0.8.1)
|
43
|
+
pry (0.11.3)
|
44
|
+
coderay (~> 1.1.0)
|
45
|
+
method_source (~> 0.9.0)
|
46
|
+
rake (10.5.0)
|
47
|
+
rspec (3.7.0)
|
48
|
+
rspec-core (~> 3.7.0)
|
49
|
+
rspec-expectations (~> 3.7.0)
|
50
|
+
rspec-mocks (~> 3.7.0)
|
51
|
+
rspec-core (3.7.1)
|
52
|
+
rspec-support (~> 3.7.0)
|
53
|
+
rspec-expectations (3.7.0)
|
54
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
55
|
+
rspec-support (~> 3.7.0)
|
56
|
+
rspec-mocks (3.7.0)
|
57
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
58
|
+
rspec-support (~> 3.7.0)
|
59
|
+
rspec-support (3.7.0)
|
60
|
+
thread_safe (0.3.6)
|
61
|
+
tzinfo (1.2.4)
|
62
|
+
thread_safe (~> 0.1)
|
63
|
+
|
64
|
+
PLATFORMS
|
65
|
+
ruby
|
66
|
+
|
67
|
+
DEPENDENCIES
|
68
|
+
bundler (~> 1.16)
|
69
|
+
delayed_job
|
70
|
+
dynomatic!
|
71
|
+
pry
|
72
|
+
rake (~> 10.0)
|
73
|
+
rspec (~> 3.0)
|
74
|
+
|
75
|
+
BUNDLED WITH
|
76
|
+
1.16.0
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 David Verhasselt
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
# Dynomatic
|
2
|
+
|
3
|
+
Use this gem to automatically scale up/down your Heroku worker dynos based on the number of jobs currently waiting in the queue. Currently only DelayedJob is supported but it's really easy to add support for your preferred background job library.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'dynomatic'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install dynomatic
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Configure it as follows:
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
# In an initializer:
|
27
|
+
Dynomatic.configure do |config|
|
28
|
+
# Optional, since it will try to detect the correct adapter:
|
29
|
+
# config.adapter = Dynomatic::Adapters::DelayedJob
|
30
|
+
|
31
|
+
# Check your heroku account for the correct token, or run
|
32
|
+
#
|
33
|
+
# heroku auth:token
|
34
|
+
#
|
35
|
+
config.heroku_token = ENV["HEROKU_TOKEN"]
|
36
|
+
config.heroku_app = ENV["HEROKU_APP_NAME"]
|
37
|
+
|
38
|
+
# Add your own rules here. Dynomatic will select the lowest dyno count that
|
39
|
+
# matches the "at_least" number of jobs.
|
40
|
+
#
|
41
|
+
# Some examples based on the following rules:
|
42
|
+
# 25 jobs = 10 dynos, 31 jobs = 15 dynos
|
43
|
+
config.rules = [
|
44
|
+
{at_least: 0, dynos: 1},
|
45
|
+
{at_least: 10, dynos: 5},
|
46
|
+
{at_least: 20, dynos: 10},
|
47
|
+
{at_least: 30, dynos: 15},
|
48
|
+
]
|
49
|
+
|
50
|
+
# Optional (see README), let Dynomatic know which are the worker dynos:
|
51
|
+
# config.worker_names = %w(worker1 worker2 worker3 worker4)
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
## What if I'm using Hobby dynos?
|
56
|
+
|
57
|
+
Heroku only allows one to scale up/down dynos if they're the more expensive "professional" dynos. If you're using Hobby dynos, you can only start and stop them.
|
58
|
+
|
59
|
+
To work around that, we can just create a bunch of different dyno types, and then enable/disable them as a means of scaling up or down.
|
60
|
+
|
61
|
+
First you need to setup the dynos in your `Procfile`. Wheras before it probably looked a bit like this:
|
62
|
+
|
63
|
+
```
|
64
|
+
web: bundle exec puma -C config/puma.rb
|
65
|
+
worker: bundle exec rails jobs:work
|
66
|
+
```
|
67
|
+
|
68
|
+
Now add a bunch of worker-types with the exact same command:
|
69
|
+
|
70
|
+
```
|
71
|
+
web: bundle exec puma -C config/puma.rb
|
72
|
+
worker1: bundle exec rails jobs:work
|
73
|
+
worker2: bundle exec rails jobs:work
|
74
|
+
worker3: bundle exec rails jobs:work
|
75
|
+
worker4: bundle exec rails jobs:work
|
76
|
+
```
|
77
|
+
|
78
|
+
You can add however many you want, but we can't scale beyond the amount that you define here.
|
79
|
+
|
80
|
+
Next, in the Dynomatic configuration, add the names of those worker dyno types:
|
81
|
+
|
82
|
+
```
|
83
|
+
Dynomatic.configure do |config|
|
84
|
+
# ...
|
85
|
+
config.worker_names = %w(worker1 worker2 worker3 worker4)
|
86
|
+
|
87
|
+
# Since we only have 4 worker dyno types, we can only scale up to 4:
|
88
|
+
config.rules = [
|
89
|
+
{at_least: 0, dynos: 1},
|
90
|
+
{at_least: 50, dynos: 2},
|
91
|
+
{at_least: 100, dynos: 4},
|
92
|
+
]
|
93
|
+
end
|
94
|
+
```
|
95
|
+
|
96
|
+
Now instead of scaling up/down a singular `worker` dyno depending on the rules, Dynomatic will instead start/stop the next dyno type in the `worker_names` type.
|
97
|
+
|
98
|
+
Considering the above example, if there's 55 jobs in the queue, Dynomatic will start both `worker1` and `worker2` and stop `worker3` and `worker4`, while if there's only 20, it will only start `worker1` and stop the remainder.
|
99
|
+
|
100
|
+
## FAQ
|
101
|
+
|
102
|
+
_Does this take into account jobs in the future, or failed, retrying jobs?_
|
103
|
+
|
104
|
+
No, it only counts jobs that need to be run right now.
|
105
|
+
|
106
|
+
_How do you ensure multi-thread/multi-process workers don't all try to scale the workers_
|
107
|
+
I don't, each worker thread of each worker process will do their own call to the API. It's no problem if Heroku receives multiple calls to set the dyno-count to e.g. 20, it will ignore the duplicates. Since there's 4500 requests per hour available for the API, this should also never exhaust the API calls.
|
108
|
+
|
109
|
+
## Development
|
110
|
+
|
111
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
112
|
+
|
113
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
114
|
+
|
115
|
+
## Contributing
|
116
|
+
|
117
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/dv/dynomatic.
|
118
|
+
|
119
|
+
## License
|
120
|
+
|
121
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
122
|
+
|
123
|
+
|
124
|
+
## TODO
|
125
|
+
- Hysteresis (will be hard without using a distributed state storage device)
|
126
|
+
- Other ActiveJob adapters beyond DelayedJob
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "dynomatic"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/dynomatic.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "dynomatic/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "dynomatic"
|
8
|
+
spec.version = Dynomatic::VERSION
|
9
|
+
spec.authors = ["David Verhasselt"]
|
10
|
+
spec.email = ["david@crowdway.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Gem to autoscale Heroku worker dynos based on number of pending jobs}
|
13
|
+
spec.description = %q{Gem to autoscale Heroku worker dynos based on number of pending jobs}
|
14
|
+
spec.homepage = "https://github.com/dv/dynomatic"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_dependency "activejob"
|
25
|
+
spec.add_dependency "activesupport"
|
26
|
+
spec.add_dependency "platform-api"
|
27
|
+
|
28
|
+
spec.add_development_dependency "pry"
|
29
|
+
spec.add_development_dependency "delayed_job"
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
33
|
+
end
|
data/lib/dynomatic.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require "active_job"
|
2
|
+
require "dynomatic/version"
|
3
|
+
|
4
|
+
module Dynomatic
|
5
|
+
extend ActiveSupport::Autoload
|
6
|
+
|
7
|
+
autoload :Adapters
|
8
|
+
autoload :Configuration
|
9
|
+
autoload :Master
|
10
|
+
autoload :Scaler
|
11
|
+
autoload :HobbyScaler
|
12
|
+
|
13
|
+
mattr_accessor(:configuration) { Configuration.new }
|
14
|
+
|
15
|
+
def self.configure
|
16
|
+
configuration.adapter ||= Dynomatic::Adapters.detect
|
17
|
+
|
18
|
+
yield(configuration)
|
19
|
+
|
20
|
+
Dynomatic::Master.new(configuration).install!
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Dynomatic
|
2
|
+
module Adapters
|
3
|
+
extend ActiveSupport::Autoload
|
4
|
+
|
5
|
+
autoload :DelayedJob
|
6
|
+
|
7
|
+
module_function
|
8
|
+
|
9
|
+
def detect
|
10
|
+
case
|
11
|
+
when defined? ::Delayed::Job
|
12
|
+
Dynomatic::Adapters::DelayedJob.new
|
13
|
+
else
|
14
|
+
nil
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Dynomatic
|
2
|
+
class HobbyScaler
|
3
|
+
attr :scaler, :worker_processes
|
4
|
+
|
5
|
+
def initialize(heroku_token, heroku_app, worker_processes)
|
6
|
+
@scaler = Scaler.new(heroku_token, heroku_app)
|
7
|
+
@worker_processes = worker_processes
|
8
|
+
end
|
9
|
+
|
10
|
+
def scale_to(dyno_count)
|
11
|
+
start_processes = Array(worker_processes.first(dyno_count))
|
12
|
+
stop_processes = Array(worker_processes[dyno_count..-1])
|
13
|
+
|
14
|
+
start_processes.each do |process|
|
15
|
+
scaler.start!(process)
|
16
|
+
end
|
17
|
+
|
18
|
+
stop_processes.each do |process|
|
19
|
+
scaler.stop!(process)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Dynomatic
|
2
|
+
class Master
|
3
|
+
attr_accessor :current_dyno_count, :configuration
|
4
|
+
|
5
|
+
def initialize(configuration)
|
6
|
+
@configuration = configuration
|
7
|
+
end
|
8
|
+
|
9
|
+
def install!
|
10
|
+
this = self
|
11
|
+
|
12
|
+
ActiveJob::Base.before_perform do
|
13
|
+
this.adjust_dynos!
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
# Main method
|
18
|
+
def adjust_dynos!
|
19
|
+
job_count = configuration.adapter.job_count
|
20
|
+
new_dyno_count = dyno_count_for_job_count(job_count)
|
21
|
+
|
22
|
+
if current_dyno_count != new_dyno_count
|
23
|
+
set_dyno_count!(new_dyno_count)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def dyno_count_for_job_count(job_count)
|
30
|
+
rule = configuration.sorted_rules.reverse.find { |rule| rule[:at_least] <= job_count }
|
31
|
+
|
32
|
+
rule[:dynos]
|
33
|
+
end
|
34
|
+
|
35
|
+
def set_dyno_count!(new_dyno_count)
|
36
|
+
old_dyno_count = current_dyno_count
|
37
|
+
self.current_dyno_count = new_dyno_count
|
38
|
+
|
39
|
+
scaler.scale_to(new_dyno_count)
|
40
|
+
rescue => error
|
41
|
+
# If something went wrong, reset to old value
|
42
|
+
self.current_dyno_count = old_dyno_count
|
43
|
+
|
44
|
+
Rails.logger.error "Something went wrong while adjusting dyno count: #{error.message}."
|
45
|
+
end
|
46
|
+
|
47
|
+
def scaler
|
48
|
+
@scaler ||=
|
49
|
+
if configuration.worker_names.present?
|
50
|
+
HobbyScaler.new(configuration.heroku_token, configuration.heroku_app, configuration.worker_names)
|
51
|
+
else
|
52
|
+
Scaler.new(configuration.heroku_token, configuration.heroku_app)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require "platform-api"
|
2
|
+
|
3
|
+
module Dynomatic
|
4
|
+
class Scaler
|
5
|
+
attr :heroku_token, :heroku_app
|
6
|
+
|
7
|
+
def initialize(heroku_token, heroku_app)
|
8
|
+
@heroku_token = heroku_token
|
9
|
+
@heroku_app = heroku_app
|
10
|
+
end
|
11
|
+
|
12
|
+
def scale_to(dyno_count, type: "worker")
|
13
|
+
Rails.logger.info "Scaling #{type} to #{dyno_count}"
|
14
|
+
|
15
|
+
client.formation.update(heroku_app, type, {quantity: dyno_count})
|
16
|
+
end
|
17
|
+
|
18
|
+
def start!(type)
|
19
|
+
scale_to(1, type: type)
|
20
|
+
end
|
21
|
+
|
22
|
+
def stop!(type)
|
23
|
+
scale_to(0, type: type)
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def client
|
29
|
+
@client = ::PlatformAPI.connect_oauth(heroku_token)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dynomatic
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- David Verhasselt
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-02-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activejob
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: platform-api
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: delayed_job
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.16'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.16'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '10.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '10.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.0'
|
125
|
+
description: Gem to autoscale Heroku worker dynos based on number of pending jobs
|
126
|
+
email:
|
127
|
+
- david@crowdway.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".gitignore"
|
133
|
+
- ".rspec"
|
134
|
+
- ".travis.yml"
|
135
|
+
- Gemfile
|
136
|
+
- Gemfile.lock
|
137
|
+
- LICENSE.txt
|
138
|
+
- README.md
|
139
|
+
- Rakefile
|
140
|
+
- bin/console
|
141
|
+
- bin/setup
|
142
|
+
- dynomatic.gemspec
|
143
|
+
- lib/dynomatic.rb
|
144
|
+
- lib/dynomatic/adapters.rb
|
145
|
+
- lib/dynomatic/adapters/delayed_job.rb
|
146
|
+
- lib/dynomatic/configuration.rb
|
147
|
+
- lib/dynomatic/hobby_scaler.rb
|
148
|
+
- lib/dynomatic/master.rb
|
149
|
+
- lib/dynomatic/scaler.rb
|
150
|
+
- lib/dynomatic/version.rb
|
151
|
+
homepage: https://github.com/dv/dynomatic
|
152
|
+
licenses:
|
153
|
+
- MIT
|
154
|
+
metadata: {}
|
155
|
+
post_install_message:
|
156
|
+
rdoc_options: []
|
157
|
+
require_paths:
|
158
|
+
- lib
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
requirements: []
|
170
|
+
rubyforge_project:
|
171
|
+
rubygems_version: 2.5.1
|
172
|
+
signing_key:
|
173
|
+
specification_version: 4
|
174
|
+
summary: Gem to autoscale Heroku worker dynos based on number of pending jobs
|
175
|
+
test_files: []
|