gitlab-sidekiq-fetcher 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- 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 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efdc9461358b538f2b0692cc179639b802a6f0bf4959b73e1d0821a4c40f0713
|
4
|
+
data.tar.gz: ccbe252394f22e6fafb198ddba9481e23776e7cfa2848807e1e5c34a5269c76d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 010da1750797c367b01cd8e1d8df281fa70759e9035f0ebaea71f53349f3ebbe54bb04dea74694d50bb595938b049733119ffd5ee4c85d5fd42d719e71a07809
|
7
|
+
data.tar.gz: d9f89a5dc1e6d6117df1f3704159ea79160a038d8a7a47939d1c772f07c4f3be2426389cd63d14a0ecf469035cc583ba3ea943cf5a14c2232ee3cb44bf09b21c
|
@@ -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
|
-
|
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.
|
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:
|
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.
|
81
|
+
rubygems_version: 3.1.4
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: Reliable fetch extension for Sidekiq
|