sidekiq-amigo 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/amigo/retry.rb +6 -1
- data/lib/amigo/version.rb +1 -1
- 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: defd2060d1c4a56780815bbaff9cfc54169ed12857fc5c1e20a075a5ea60ee8d
|
4
|
+
data.tar.gz: 1cefc43ca64867f333d5706c5f2df3998a3fac294d957ccdf95f05763589d1aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fde4becc89be41126f447ce282a9c6ccbe5adb05b979cc6dbea455d7bd7735043001115722450b412434253a23dc0b80bab6766b43804ad58698d0eddfd6713b
|
7
|
+
data.tar.gz: 43209e4289474df8d62bc1d8052869df1cd7c375df921ead70f5aeb69f03be79dbaba53f33b1f04d66153681fd0f6e92a598176a3e7261718cda972306b571af
|
data/lib/amigo/retry.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "sidekiq"
|
4
|
+
require "sidekiq/api"
|
4
5
|
|
5
6
|
# Middleware so Sidekiq workers can use a custom retry logic.
|
6
7
|
# See +Amigo::Retry::Retry+, +Amigo::Retry::Die+,
|
@@ -64,11 +65,15 @@ module Amigo
|
|
64
65
|
|
65
66
|
def handle_retry(worker, job, e)
|
66
67
|
Sidekiq.logger.info("scheduling_retry")
|
68
|
+
job["error_class"] = e.class.to_s
|
69
|
+
job["error_message"] = e.to_s
|
67
70
|
self.amigo_retry_in(worker.class, job, e.interval_or_timestamp)
|
68
71
|
end
|
69
72
|
|
70
|
-
def handle_die(_worker, job,
|
73
|
+
def handle_die(_worker, job, e)
|
71
74
|
Sidekiq.logger.warn("sending_to_deadset")
|
75
|
+
job["error_class"] = e.class.to_s
|
76
|
+
job["error_message"] = e.to_s
|
72
77
|
payload = Sidekiq.dump_json(job)
|
73
78
|
Sidekiq::DeadSet.new.kill(payload, notify_failure: false)
|
74
79
|
end
|
data/lib/amigo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-amigo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lithic Technology
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|