resque-population-control 0.7.0 → 0.8.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: 12df14cf5cd0637c29e83f1f0f6096dcc4b5bd8c
4
- data.tar.gz: 2ff8e90d368fe63cd150de4cd73263a62b0b724b
3
+ metadata.gz: c499dd543d9b0e214f2c557317783626225163e0
4
+ data.tar.gz: 5b454332eb9b9233b51845b8c04352f1c5acec45
5
5
  SHA512:
6
- metadata.gz: e6dc015a7751d6d7ed506392a1bf063ef403bc4de63363c4017c6229379c3c8ee41381a91bece445aba88536829c0c3a12ff916fcafc928b426151a97ebf0e74
7
- data.tar.gz: 9b5cf43514c1348454c7f4ec056addfedda992fcdeea5159e97f1530337ecc4af6e9045c03ae841335902148d504cc70599068d2ecce6f3e805b8cdd9812a940
6
+ metadata.gz: 4ae0703706bd51aeeb047b35d7a89cb3b281174c230f96fa9881dd2425e53c0058357f6e4c52bec1191dfb2e4f996694eec577bb4d45721b4d195f250d7e9382
7
+ data.tar.gz: 0433fd78e8f0b592f10364b8773ad4131ed15e86f12d890d825dc0ce579fc6be7af4f8cf76bf7c35af6a160e9a723b307dbc947f2b49a29180606eff140518f9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- resque-population-control (0.1.0)
4
+ resque-population-control (0.7.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,10 +1,14 @@
1
1
  module Resque
2
2
  module Plugins
3
3
  module PopulationControl
4
- VERSION = "0.7.0"
4
+ VERSION = "0.8.0"
5
5
 
6
6
  class PopulationExceeded < ::StandardError; end;
7
7
 
8
+ class << self
9
+ attr_accessor :redis
10
+ end
11
+
8
12
  def population_control max, options = {}
9
13
  @population_control_max = max
10
14
  @population_control_options = options
@@ -61,7 +65,7 @@ module Resque
61
65
  end
62
66
 
63
67
  def population_control_redis
64
- @population_control_redis ||= Resque.redis.redis
68
+ @population_control_redis ||= Resque::Plugins::PopulationControl.redis || Resque.redis.redis
65
69
  end
66
70
 
67
71
  def population_control_cache_key
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-population-control
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Misha Conway
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-30 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  requirements: []
91
91
  rubyforge_project:
92
- rubygems_version: 2.5.1
92
+ rubygems_version: 2.6.7
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: Restrict max number of resque jobs.