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 +5 -5
- data/gitlab-sidekiq-fetcher.gemspec +1 -1
- data/lib/sidekiq/base_reliable_fetch.rb +1 -1
- data/spec/fetch_shared_examples.rb +16 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a179330459058ca56cd918066793895684d63bbfcfed73eccd8687d5ed22ea15
|
4
|
+
data.tar.gz: fb0115218a6c35a6349f66c79a0a9eacbf1434a7fc6015100ff2dffb0bf8cef7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4ef091732aa1cd0b69b889d7649c6f4ade001989360cdb717296cbfec6db7551e379b278b64fcb823b0cf293245b72293fbef8ad8b009158060983ecf421328
|
7
|
+
data.tar.gz: 932751a38d73e1f1d0d147fb654ce802bc3a0f9b20319ab76ef9525fd29661ac70b505aa47e71932f9e02d6651785f8779dfdbd3723226b1f53d55d7e1e3880d
|
@@ -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
|
-
|
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.
|
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:
|
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
|
-
|
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
|