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.
Files changed (3) hide show
  1. data/README.md +1 -0
  2. data/lib/workless/scaler.rb +3 -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.
@@ -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
- after_destroy "self.class.scaler.down"
14
- after_create "self.class.scaler.up"
15
- after_update "self.class.scaler.down", :unless => Proc.new {|r| r.failed_at.nil? }
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workless
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: