sidekiq-status 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/sidekiq-status/client_middleware.rb +8 -2
- data/lib/sidekiq-status/version.rb +1 -1
- data/spec/lib/sidekiq-status_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7b21776f1059a82b3a04c1e81639bcfba2c9184a00906688639333b2ee0df42
|
4
|
+
data.tar.gz: 06ffc2506014272d4a40272cc3204696efed21fee426000da8b6c3a6c5e183d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0f173c573f137b0626b9a76d8977e4d536083e685d376f8ea6201a9d9ed8f48b793f3e59b5f06e57c0c518210ffe7c1fefebbfce9ea4033e77a270eab73d9f1
|
7
|
+
data.tar.gz: 4f963ddaaa7f5a205fc9b6927ed994734f177a6438dd893ba2df435aa626c15614c3676b33d1feaaea03c341cfedb7e344e1a862e004acbd457ae7f9347cabd9
|
data/CHANGELOG.md
CHANGED
@@ -21,10 +21,16 @@ module Sidekiq::Status
|
|
21
21
|
|
22
22
|
# Determine the actual job class
|
23
23
|
klass = msg["args"][0]["job_class"] || worker_class rescue worker_class
|
24
|
-
job_class = klass.is_a?(Class)
|
24
|
+
job_class = if klass.is_a?(Class)
|
25
|
+
klass
|
26
|
+
elsif Module.const_defined?(klass)
|
27
|
+
Module.const_get(klass)
|
28
|
+
else
|
29
|
+
nil
|
30
|
+
end
|
25
31
|
|
26
32
|
# Store data if the job is a Sidekiq::Status::Worker
|
27
|
-
if job_class.ancestors.include?(Sidekiq::Status::Worker)
|
33
|
+
if job_class && job_class.ancestors.include?(Sidekiq::Status::Worker)
|
28
34
|
initial_metadata = {
|
29
35
|
jid: msg['jid'],
|
30
36
|
status: :queued,
|
@@ -148,6 +148,16 @@ describe Sidekiq::Status do
|
|
148
148
|
expect_2_jobs_ttl_covers 1..Sidekiq::Status::DEFAULT_EXPIRY
|
149
149
|
end
|
150
150
|
|
151
|
+
it "does jobs without a known class" do
|
152
|
+
seed_secure_random_with_job_ids
|
153
|
+
start_server(:expiration => expiration_param) do
|
154
|
+
expect {
|
155
|
+
Sidekiq::Client.new(Sidekiq.redis_pool).
|
156
|
+
push("class" => "NotAKnownClass", "args" => [])
|
157
|
+
}.to_not raise_error
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
151
161
|
it "retries failed jobs" do
|
152
162
|
allow(SecureRandom).to receive(:hex).and_return(retried_job_id)
|
153
163
|
start_server do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeniy Tsvigun
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-08-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sidekiq
|