gitlab-sidekiq-fetcher 0.7.0 → 0.7.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: 6b9cf610a1915d63141331ba0e4820306235fc1c58e37e0124a9700d19005b99
4
- data.tar.gz: 3690c4aaff9d47c8ec108ff264984343bc3a4412123ad56ac727cdf1ae3e8fd3
3
+ metadata.gz: efdc9461358b538f2b0692cc179639b802a6f0bf4959b73e1d0821a4c40f0713
4
+ data.tar.gz: ccbe252394f22e6fafb198ddba9481e23776e7cfa2848807e1e5c34a5269c76d
5
5
  SHA512:
6
- metadata.gz: 6d5d61280c6db3b91c8107fca593fa12246db18c727389ef31cf8edf58e923bc78a2cbbe2be505962664ed56c8189513dc0ad0312e545988b70666839f191f66
7
- data.tar.gz: cd1459179a3f97b3b3194a21e8335367e9021db590cb9441613d6d88030b1b86cc495b00e1ff37dc0cf7ea683d40e6b10d3c511c7d956a70e8c26c67a4bc0903
6
+ metadata.gz: 010da1750797c367b01cd8e1d8df281fa70759e9035f0ebaea71f53349f3ebbe54bb04dea74694d50bb595938b049733119ffd5ee4c85d5fd42d719e71a07809
7
+ data.tar.gz: d9f89a5dc1e6d6117df1f3704159ea79160a038d8a7a47939d1c772f07c4f3be2426389cd63d14a0ecf469035cc583ba3ea943cf5a14c2232ee3cb44bf09b21c
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'gitlab-sidekiq-fetcher'
3
- s.version = '0.7.0'
3
+ s.version = '0.7.1'
4
4
  s.authors = ['TEA', 'GitLab']
5
5
  s.email = 'valery@gitlab.com'
6
6
  s.license = 'LGPL-3.0'
@@ -176,7 +176,7 @@ module Sidekiq
176
176
  # Example: "working:name_of_the_job:queue:{hostname}:{PID}"
177
177
  hostname, pid = key.scan(/:([^:]*):([0-9]*)\z/).flatten
178
178
 
179
- continue if hostname.nil? || pid.nil?
179
+ next if hostname.nil? || pid.nil?
180
180
 
181
181
  clean_working_queue!(key) if self.class.worker_dead?(hostname, pid, conn)
182
182
  end
@@ -42,6 +42,22 @@ shared_examples 'a Sidekiq fetcher' do
42
42
  end
43
43
  end
44
44
 
45
+ it 'ignores working queue keys in unknown formats' do
46
+ # Add a spurious non-numeric char segment at the end; this simulates any other
47
+ # incorrect form in general
48
+ malformed_key = "#{other_process_working_queue_name('assigned')}:X"
49
+ Sidekiq.redis do |conn|
50
+ conn.rpush(malformed_key, job)
51
+ end
52
+
53
+ uow = fetcher.retrieve_work
54
+
55
+ Sidekiq.redis do |conn|
56
+ expect(conn.llen(malformed_key)).to eq 1
57
+ end
58
+ end
59
+
60
+
45
61
  it 'does not requeue jobs from live working queue' do
46
62
  working_queue = live_other_process_working_queue_name('assigned')
47
63
 
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.7.0
4
+ version: 0.7.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-30 00:00:00.000000000 Z
12
+ date: 2021-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
- rubygems_version: 3.0.6
81
+ rubygems_version: 3.1.4
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Reliable fetch extension for Sidekiq