heroku_dj_auto_scale 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,7 +19,7 @@ module HerokuDjAutoScale
19
19
  end
20
20
  end
21
21
 
22
- def get_workers
22
+ def workers
23
23
  if ENV['USE_HEROKU_SCALING'] == 'true'
24
24
  if stack == "cedar"
25
25
  heroku.ps(ENV['HEROKU_APP']).count { |p| p["process"] =~ /worker\.\d?/ }
@@ -58,16 +58,20 @@ module HerokuDjAutoScale
58
58
 
59
59
  def enqueue(*args)
60
60
  [
61
+ {
62
+ :workers => 0, # This many workers
63
+ :job_count => 0 # For this many jobs or more, until the next level
64
+ },
61
65
  {
62
66
  :workers => 1, # This many workers
63
67
  :job_count => 1 # For this many jobs or more, until the next level
64
68
  },
65
69
  {
66
- :workers => 1,
70
+ :workers => 2,
67
71
  :job_count => 400
68
72
  },
69
73
  {
70
- :workers => 1,
74
+ :workers => 3,
71
75
  :job_count => 2500
72
76
  }
73
77
  ].reverse_each do |scale_info|
@@ -1,3 +1,3 @@
1
1
  module HerokuDjAutoScale
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: heroku_dj_auto_scale
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.8
5
+ version: 0.0.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Joel Basson