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 +4 -4
- data/lib/resque/plugins/population_control.rb +2 -2
- data/lib/resque/population/control.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 393c9c0078543f7c093ea7b6a918212db58f2606
|
4
|
+
data.tar.gz: 124adb43a962a87db494620c432a1da3afb33e84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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.
|
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: []
|