gitlab-sidekiq-fetcher 0.6.0 → 0.6.1

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
  SHA256:
3
- metadata.gz: 4815e3e75915230d7b2eaf2fe3fa0daa288ec4c670b2cd211cb659aff4838788
4
- data.tar.gz: c8b491f2d1a2678ef40fe856a55bf89341e041070c40941ca693685fa3c048cf
3
+ metadata.gz: a71699d717aeb95cb406ed566e394a34e7978df8289db2fe89aff82046dd8e19
4
+ data.tar.gz: 4390a2a95507b8a6c5c08a9d3dac384f58f0d11311afd1da5973e4c61240120a
5
5
  SHA512:
6
- metadata.gz: 1667fb3ffb47117ac3c756c07a85867d96871b5489e820823735b62912df0d82b4d6c10be478e1f291d637d2ed15aff99a958f4fd884df98f026ee8c8f9c4c83
7
- data.tar.gz: 5dad56f30515be87e79c58c3b5dce301213d427fe579309bca2a525e2b8664b94f0763c7eabfb2443324c5d8ecf5403f9826a0772e3b09b74e215e72ebfc4226
6
+ metadata.gz: fa95de2f9b33f01b45c547b23bfd4728ab88ed304ecbeaa2416e03b1a6d6bff678f097b37ae85679ef69f520a37a6f7115207170284229df706172f60d103b19
7
+ data.tar.gz: d7981fd4afe0abf8454caffac4c1fa8e290dd8617ce28edf45b4a29a9deb9b3a9cd583f64038cc3808b814923ab74fc370d65d9a42257b4af9fa97ea48542959
data/Gemfile CHANGED
@@ -7,6 +7,6 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
7
7
  group :test do
8
8
  gem "rspec", '~> 3'
9
9
  gem "pry"
10
- gem "sidekiq", '~> 5.0'
10
+ gem "sidekiq", '~> 6.0.0'
11
11
  gem 'simplecov', require: false
12
12
  end
@@ -2,7 +2,7 @@ GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
4
  coderay (1.1.2)
5
- connection_pool (2.2.2)
5
+ connection_pool (2.2.3)
6
6
  diff-lcs (1.3)
7
7
  docile (1.3.1)
8
8
  json (2.1.0)
@@ -10,10 +10,10 @@ GEM
10
10
  pry (0.11.3)
11
11
  coderay (~> 1.1.0)
12
12
  method_source (~> 0.9.0)
13
- rack (2.0.5)
14
- rack-protection (2.0.4)
13
+ rack (2.2.3)
14
+ rack-protection (2.0.8.1)
15
15
  rack
16
- redis (4.0.2)
16
+ redis (4.2.1)
17
17
  rspec (3.8.0)
18
18
  rspec-core (~> 3.8.0)
19
19
  rspec-expectations (~> 3.8.0)
@@ -27,10 +27,11 @@ GEM
27
27
  diff-lcs (>= 1.2.0, < 2.0)
28
28
  rspec-support (~> 3.8.0)
29
29
  rspec-support (3.8.0)
30
- sidekiq (5.2.2)
31
- connection_pool (~> 2.2, >= 2.2.2)
32
- rack-protection (>= 1.5.0)
33
- redis (>= 3.3.5, < 5)
30
+ sidekiq (6.0.7)
31
+ connection_pool (>= 2.2.2)
32
+ rack (~> 2.0)
33
+ rack-protection (>= 2.0.0)
34
+ redis (>= 4.1.0)
34
35
  simplecov (0.16.1)
35
36
  docile (~> 1.1)
36
37
  json (>= 1.8, < 3)
@@ -43,8 +44,8 @@ PLATFORMS
43
44
  DEPENDENCIES
44
45
  pry
45
46
  rspec (~> 3)
46
- sidekiq (~> 5.0)
47
+ sidekiq (~> 6.0.0)
47
48
  simplecov
48
49
 
49
50
  BUNDLED WITH
50
- 1.17.1
51
+ 1.17.2
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'gitlab-sidekiq-fetcher'
3
- s.version = '0.6.0'
3
+ s.version = '0.6.1'
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', '< 7'
13
+ s.add_dependency 'sidekiq', '>= 5', '< 6.1'
14
14
  end
@@ -41,10 +41,12 @@ module Sidekiq
41
41
  end
42
42
 
43
43
  def self.setup_reliable_fetch!(config)
44
- fetch = config.options[:semi_reliable_fetch] ? SemiReliableFetch : ReliableFetch
45
- fetch = fetch.new(config.options) if Sidekiq::VERSION >= '6'
44
+ config.options[:fetch] = if config.options[:semi_reliable_fetch]
45
+ Sidekiq::SemiReliableFetch
46
+ else
47
+ Sidekiq::ReliableFetch
48
+ end
46
49
 
47
- config.options[:fetch] = fetch
48
50
  Sidekiq.logger.info('GitLab reliable fetch activated!')
49
51
 
50
52
  start_heartbeat_thread
@@ -82,10 +84,6 @@ module Sidekiq
82
84
  Sidekiq.logger.debug("Heartbeat for hostname: #{hostname} and pid: #{pid}")
83
85
  end
84
86
 
85
- def bulk_requeue(inprogress, options)
86
- self.class.bulk_requeue(inprogress, options)
87
- end
88
-
89
87
  def self.bulk_requeue(inprogress, _options)
90
88
  return if inprogress.empty?
91
89
 
@@ -8,19 +8,7 @@ class ReliabilityTestWorker
8
8
  sleep 1
9
9
 
10
10
  Sidekiq.redis do |redis|
11
- redis.lpush(REDIS_FINISHED_LIST, get_sidekiq_job_id)
11
+ redis.lpush(REDIS_FINISHED_LIST, jid)
12
12
  end
13
13
  end
14
-
15
- def get_sidekiq_job_id
16
- context_data = Thread.current[:sidekiq_context]&.first
17
-
18
- return unless context_data
19
-
20
- index = context_data.index('JID-')
21
-
22
- return unless index
23
-
24
- context_data[index + 4..-1]
25
- end
26
14
  end
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.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TEA
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-07-22 00:00:00.000000000 Z
12
+ date: 2020-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '5'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '7'
23
+ version: '6.1'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '5'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '7'
33
+ version: '6.1'
34
34
  description: Redis reliable queue pattern implemented in Sidekiq
35
35
  email: valery@gitlab.com
36
36
  executables: []
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
- rubygems_version: 3.0.3
87
+ rubygems_version: 3.0.6
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: Reliable fetch extension for Sidekiq