resque-population-control 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d6da100902f1cead6fe811db755eb74f64250d2
4
- data.tar.gz: ef21f31aa58b086329e16a1de942012b752a15d3
3
+ metadata.gz: 393c9c0078543f7c093ea7b6a918212db58f2606
4
+ data.tar.gz: 124adb43a962a87db494620c432a1da3afb33e84
5
5
  SHA512:
6
- metadata.gz: e54fe5f601db298ea06f860a24d9a00eef5192bf72f6e086f5e2eae7f954c033472a3af14a9e9aff9c55cc7de797275a7fd94d028f9f5ea2579736d586718ddd
7
- data.tar.gz: ac7e9913d986c3eb6d4b444d59c90493c43abef298c47aac71500048c09cda7e4338f2f7b924ddbb3d49a1b7e571c094962783b07963384575138d4231dfcefc
6
+ metadata.gz: 58b09927f36d92500573ca6ba36053bc1bc4c11eedb52152d325b80ca53e5f84c0a2c450d414a195493bc950dfc308401504c00093479d20b79f4eef2bc33bc1
7
+ data.tar.gz: f522188248425c90f140fdecd4d5e9f2ec5f0c538e618f0412544c751c282d52c422e55e7b9a4c66e0b511d020f76451c996a1e7c8eae964f0ab02d4b5581303
@@ -1,7 +1,7 @@
1
1
  module Resque
2
2
  module Plugins
3
3
  module PopulationControl
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
 
6
6
  class PopulationExceeded < ::StandardError; end;
7
7
 
@@ -38,7 +38,7 @@ module Resque
38
38
  end
39
39
 
40
40
  def population_control_decrement
41
- population_control_redis.decr population_control_cache_key
41
+ population_control_redis.set population_control_cache_key, 0 if population_control_redis.decr(population_control_cache_key) <= 0
42
42
  end
43
43
 
44
44
  def population_control_redis
@@ -0,0 +1 @@
1
+ require '../plugins/population_control'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-population-control
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Misha Conway
@@ -69,6 +69,7 @@ files:
69
69
  - bin/setup
70
70
  - lib/resque-population-control.rb
71
71
  - lib/resque/plugins/population_control.rb
72
+ - lib/resque/population/control.rb
72
73
  - population-control.gemspec
73
74
  homepage: https://github.com/MishaConway/resque-population-control
74
75
  licenses: []