gitlab-sidekiq-fetcher 0.5.2 → 0.6.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
- SHA1:
3
- metadata.gz: d35e77ddc4f9b05b7eaa90ef5d05815f724e47ef
4
- data.tar.gz: 1aac18934185ff3b3a09050cb38dbcf31115fbbc
2
+ SHA256:
3
+ metadata.gz: 4815e3e75915230d7b2eaf2fe3fa0daa288ec4c670b2cd211cb659aff4838788
4
+ data.tar.gz: c8b491f2d1a2678ef40fe856a55bf89341e041070c40941ca693685fa3c048cf
5
5
  SHA512:
6
- metadata.gz: 9776fe9d58da5f580b1c27df618c7b4aec1088e46b14efc4497e8c77b233ac97ce7fbb6bb6a03a84ed65a8cb24a41d0ee31a42dcb380d57836ef709ea3577ef8
7
- data.tar.gz: 7651a6704485f5150e22a30bc9ef47674e1d1fafabb5a5a42aaa844e14274012c688d41bef650d1f12a9268609291164a84f9ed2678157c5cc8af73116275d93
6
+ metadata.gz: 1667fb3ffb47117ac3c756c07a85867d96871b5489e820823735b62912df0d82b4d6c10be478e1f291d637d2ed15aff99a958f4fd884df98f026ee8c8f9c4c83
7
+ data.tar.gz: 5dad56f30515be87e79c58c3b5dce301213d427fe579309bca2a525e2b8664b94f0763c7eabfb2443324c5d8ecf5403f9826a0772e3b09b74e215e72ebfc4226
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'gitlab-sidekiq-fetcher'
3
- s.version = '0.5.2'
3
+ s.version = '0.6.0'
4
4
  s.authors = ['TEA', 'GitLab']
5
5
  s.email = 'valery@gitlab.com'
6
6
  s.license = 'LGPL-3.0'
@@ -10,5 +10,5 @@ Gem::Specification.new do |s|
10
10
  s.require_paths = ['lib']
11
11
  s.files = `git ls-files`.split($\)
12
12
  s.test_files = []
13
- s.add_dependency 'sidekiq', '~> 5'
13
+ s.add_dependency 'sidekiq', '>= 5', '< 7'
14
14
  end
@@ -41,12 +41,10 @@ module Sidekiq
41
41
  end
42
42
 
43
43
  def self.setup_reliable_fetch!(config)
44
- config.options[:fetch] = if config.options[:semi_reliable_fetch]
45
- Sidekiq::SemiReliableFetch
46
- else
47
- Sidekiq::ReliableFetch
48
- end
44
+ fetch = config.options[:semi_reliable_fetch] ? SemiReliableFetch : ReliableFetch
45
+ fetch = fetch.new(config.options) if Sidekiq::VERSION >= '6'
49
46
 
47
+ config.options[:fetch] = fetch
50
48
  Sidekiq.logger.info('GitLab reliable fetch activated!')
51
49
 
52
50
  start_heartbeat_thread
@@ -84,6 +82,10 @@ module Sidekiq
84
82
  Sidekiq.logger.debug("Heartbeat for hostname: #{hostname} and pid: #{pid}")
85
83
  end
86
84
 
85
+ def bulk_requeue(inprogress, options)
86
+ self.class.bulk_requeue(inprogress, options)
87
+ end
88
+
87
89
  def self.bulk_requeue(inprogress, _options)
88
90
  return if inprogress.empty?
89
91
 
@@ -80,7 +80,7 @@ describe Sidekiq::BaseReliableFetch do
80
80
  end
81
81
 
82
82
  it 'sets heartbeat' do
83
- config = double(:sidekiq_config, options: {})
83
+ config = double(:sidekiq_config, options: { queues: [] })
84
84
 
85
85
  heartbeat_thread = described_class.setup_reliable_fetch!(config)
86
86
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-sidekiq-fetcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TEA
@@ -9,22 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-09-03 00:00:00.000000000 Z
12
+ date: 2020-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '5'
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '7'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
26
29
  - !ruby/object:Gem::Version
27
30
  version: '5'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '7'
28
34
  description: Redis reliable queue pattern implemented in Sidekiq
29
35
  email: valery@gitlab.com
30
36
  executables: []
@@ -78,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
84
  - !ruby/object:Gem::Version
79
85
  version: '0'
80
86
  requirements: []
81
- rubyforge_project:
82
- rubygems_version: 2.5.2
87
+ rubygems_version: 3.0.3
83
88
  signing_key:
84
89
  specification_version: 4
85
90
  summary: Reliable fetch extension for Sidekiq