workless 1.1.1 → 1.1.2
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/README.md +1 -0
- data/lib/workless/scaler.rb +3 -3
- metadata +1 -1
data/README.md
CHANGED
@@ -9,6 +9,7 @@ By adding the gem to your project and configuring our Heroku app with some confi
|
|
9
9
|
|
10
10
|
## Updates
|
11
11
|
|
12
|
+
* Version 1.1.2 includes a change by @davidakachaos to scale workers using after_commit
|
12
13
|
* Version 1.1.1 includes a fix from @filiptepper and @fixr to correctly scale workers
|
13
14
|
* Version 1.1.0 has been released, this adds support for scaling using multiple workers thanks to @jaimeiniesta and @davidakachaos.
|
14
15
|
* Version 1.0.0 has been released, this brings compatibility with delayed_job 3 and compatibility with Rails 2.3.x and up.
|
data/lib/workless/scaler.rb
CHANGED
@@ -10,9 +10,9 @@ module Delayed
|
|
10
10
|
def self.included(base)
|
11
11
|
base.send :extend, ClassMethods
|
12
12
|
base.class_eval do
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
after_commit "self.class.scaler.down", :on => :destroy
|
14
|
+
after_commit "self.class.scaler.up", :on => :create
|
15
|
+
after_commit "self.class.scaler.down", :on => :update, :unless => Proc.new {|r| r.failed_at.nil? }
|
16
16
|
end
|
17
17
|
|
18
18
|
end
|