gitlab-sidekiq-fetcher 0.5.2 → 0.5.3

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: a179330459058ca56cd918066793895684d63bbfcfed73eccd8687d5ed22ea15
4
+ data.tar.gz: fb0115218a6c35a6349f66c79a0a9eacbf1434a7fc6015100ff2dffb0bf8cef7
5
5
  SHA512:
6
- metadata.gz: 9776fe9d58da5f580b1c27df618c7b4aec1088e46b14efc4497e8c77b233ac97ce7fbb6bb6a03a84ed65a8cb24a41d0ee31a42dcb380d57836ef709ea3577ef8
7
- data.tar.gz: 7651a6704485f5150e22a30bc9ef47674e1d1fafabb5a5a42aaa844e14274012c688d41bef650d1f12a9268609291164a84f9ed2678157c5cc8af73116275d93
6
+ metadata.gz: c4ef091732aa1cd0b69b889d7649c6f4ade001989360cdb717296cbfec6db7551e379b278b64fcb823b0cf293245b72293fbef8ad8b009158060983ecf421328
7
+ data.tar.gz: 932751a38d73e1f1d0d147fb654ce802bc3a0f9b20319ab76ef9525fd29661ac70b505aa47e71932f9e02d6651785f8779dfdbd3723226b1f53d55d7e1e3880d
@@ -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.5.3'
4
4
  s.authors = ['TEA', 'GitLab']
5
5
  s.email = 'valery@gitlab.com'
6
6
  s.license = 'LGPL-3.0'
@@ -131,7 +131,7 @@ module Sidekiq
131
131
  # Example: "working:name_of_the_job:queue:{hostname}:{PID}"
132
132
  hostname, pid = key.scan(/:([^:]*):([0-9]*)\z/).flatten
133
133
 
134
- continue if hostname.nil? || pid.nil?
134
+ next if hostname.nil? || pid.nil?
135
135
 
136
136
  clean_working_queue!(key) if worker_dead?(hostname, pid, conn)
137
137
  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.5.2
4
+ version: 0.5.3
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: 2019-09-03 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,8 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
- rubyforge_project:
82
- rubygems_version: 2.5.2
81
+ rubygems_version: 3.1.4
83
82
  signing_key:
84
83
  specification_version: 4
85
84
  summary: Reliable fetch extension for Sidekiq