middle_management 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +2 -2
- data/lib/middle_management/config.rb +1 -1
- data/lib/middle_management/version.rb +1 -1
- metadata +3 -3
data/README
CHANGED
@@ -16,7 +16,7 @@ To get started:
|
|
16
16
|
3) Deploy to heroku and voila - you've got auto-scaling workers!
|
17
17
|
|
18
18
|
You can also limit the rate at which workers will scale up by setting:
|
19
|
-
MIDDLE_MANAGEMENT_JOBS_PER_WORKER (default =
|
19
|
+
MIDDLE_MANAGEMENT_JOBS_PER_WORKER (default = 10)
|
20
20
|
This should be the number of jobs a single worker can do more quickly than it takes to bring up another heroku worker. For short tasks with high throughput (e.g. sending emails), you should bump this up (I set it at 10). For long tasks with low throughput (e.g. PDF generation or traversing a social graph), keep this low.
|
21
21
|
|
22
22
|
How it works:
|
@@ -30,7 +30,7 @@ Middle Management will ALWAYS honor the maximum number of workers, as set by the
|
|
30
30
|
Step-by-step chart, assumes:
|
31
31
|
MIDDLE_MANAGEMENT_MIN_WORKERS=0
|
32
32
|
MIDDLE_MANAGEMENT_MAX_WORKERS=10
|
33
|
-
MIDDLE_MANAGEMENT_JOBS_PER_WORKER=1
|
33
|
+
MIDDLE_MANAGEMENT_JOBS_PER_WORKER=1 (silly, but makes for an easy-to-follow example)
|
34
34
|
|
35
35
|
App Action Middle Management Action Total Workers Running
|
36
36
|
Boot Up 0
|
@@ -5,6 +5,6 @@ module MiddleManagement
|
|
5
5
|
HEROKU_APP = ENV['MIDDLE_MANAGEMENT_HEROKU_APP']
|
6
6
|
MIN_WORKERS = ENV['MIDDLE_MANAGEMENT_MIN_WORKERS'].to_i
|
7
7
|
MAX_WORKERS = ENV['MIDDLE_MANAGEMENT_MAX_WORKERS'].to_i
|
8
|
-
JOBS_PER_WORKER = ENV['MIDDLE_MANAGEMENT_JOBS_PER_WORKER'].to_i == 0 ?
|
8
|
+
JOBS_PER_WORKER = ENV['MIDDLE_MANAGEMENT_JOBS_PER_WORKER'].to_i == 0 ? 10 : ENV['MIDDLE_MANAGEMENT_JOBS_PER_WORKER'].to_i
|
9
9
|
end
|
10
10
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middle_management
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Robby Grossman
|