sidekiq-limit_fetch 1.5 → 1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq/limit_fetch/global/monitor.rb +7 -5
- data/lib/sidekiq/limit_fetch.rb +3 -2
- data/sidekiq-limit_fetch.gemspec +1 -1
- data/spec/spec_helper.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1422602115c90e1d7d70f170d00eb90bf2970d3
|
4
|
+
data.tar.gz: ebe990f7f327c3d7d6a6c8e0ed168db9333147a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df8ccaaf84855dc0501ec30d7845ada4f2b806472c029175c3a874b129bf95fc69c449a4b5f8c038447b5352c33df6767ff10cf43d14c1696f8174b361595932
|
7
|
+
data.tar.gz: 8b3519ae107315273f22708035e17441bb040e01152e52b1fcb51c92bcf4696b46034a431613b360a6e738523635831ed747d210075b0bf6a8769368c7383f44
|
@@ -5,8 +5,8 @@ module Sidekiq::LimitFetch::Global
|
|
5
5
|
HEARTBEAT_NAMESPACE = 'heartbeat:'
|
6
6
|
PROCESSOR_NAMESPACE = 'processor:'
|
7
7
|
|
8
|
-
HEARTBEAT_TTL =
|
9
|
-
REFRESH_TIMEOUT =
|
8
|
+
HEARTBEAT_TTL = 18
|
9
|
+
REFRESH_TIMEOUT = 10
|
10
10
|
|
11
11
|
def start!(ttl=HEARTBEAT_TTL, timeout=REFRESH_TIMEOUT)
|
12
12
|
Thread.new do
|
@@ -22,9 +22,11 @@ module Sidekiq::LimitFetch::Global
|
|
22
22
|
|
23
23
|
def update_heartbeat(ttl)
|
24
24
|
Sidekiq.redis do |it|
|
25
|
-
it.
|
26
|
-
|
27
|
-
|
25
|
+
it.pipelined do
|
26
|
+
it.set processor_key, true
|
27
|
+
it.set heartbeat_key, true
|
28
|
+
it.expire heartbeat_key, ttl
|
29
|
+
end
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
data/lib/sidekiq/limit_fetch.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require 'sidekiq'
|
2
|
-
require '
|
2
|
+
require 'forwardable'
|
3
3
|
|
4
4
|
class Sidekiq::LimitFetch
|
5
|
-
|
5
|
+
autoload :UnitOfWork, 'sidekiq/limit_fetch/unit_of_work'
|
6
|
+
|
6
7
|
require_relative 'limit_fetch/singleton'
|
7
8
|
require_relative 'limit_fetch/queues'
|
8
9
|
require_relative 'limit_fetch/local/semaphore'
|
data/sidekiq-limit_fetch.gemspec
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-limit_fetch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- brainopia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.0.
|
111
|
+
rubygems_version: 2.0.3
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Sidekiq strategy to support queue limits
|