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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac470dbfaa9bdccc0ef97b932f5b3dd713001063c6b22617a72976564a740901
4
- data.tar.gz: 7e0bf255bce4f090a9238892185486aec556949ffb629d5879758e8302e38cd0
3
+ metadata.gz: b7b21776f1059a82b3a04c1e81639bcfba2c9184a00906688639333b2ee0df42
4
+ data.tar.gz: 06ffc2506014272d4a40272cc3204696efed21fee426000da8b6c3a6c5e183d9
5
5
  SHA512:
6
- metadata.gz: cd389c60190a3cfd9b4b31c382ef6f564b62dba8a2bcdec201451d06c53ecad7f653e141aa663600ddd614bb68b5fb2a888ecd47b58660db2d5b381bb90ef438
7
- data.tar.gz: c2b36634db5c27605d82c0120048f76e90c0597d0a66b1b79dbf9529250ae0b6bab06b4ea8cc145053a23046560d1bdc2e05c335bc5c9474b6adc18192a821dc
6
+ metadata.gz: a0f173c573f137b0626b9a76d8977e4d536083e685d376f8ea6201a9d9ed8f48b793f3e59b5f06e57c0c518210ffe7c1fefebbfce9ea4033e77a270eab73d9f1
7
+ data.tar.gz: 4f963ddaaa7f5a205fc9b6927ed994734f177a6438dd893ba2df435aa626c15614c3676b33d1feaaea03c341cfedb7e344e1a862e004acbd457ae7f9347cabd9
@@ -1,3 +1,6 @@
1
+ **Version 1.1.0**
2
+ + Fixes the use case of multiple services sharing the same redis instance (#135)
3
+
1
4
  **Version 1.0.2**
2
5
  + Fixes status not being set to `:failed` after retries
3
6
 
@@ -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) ? klass : Module.const_get(klass)
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,
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Status
3
- VERSION = '1.0.2'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
@@ -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.2
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-06-19 00:00:00.000000000 Z
12
+ date: 2018-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq