inst-jobs 3.1.9 → 3.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/delayed/backend/base.rb +7 -4
- data/lib/delayed/performable_method.rb +2 -0
- data/lib/delayed/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: 372437f25842f762a361453b2846ff561868f4f1783e91b090f2dfc40a8b22f6
|
4
|
+
data.tar.gz: '091128e8391c5acf7f12263887af7f79a7253ed721c39978cd1e1a3fbd93157c'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17b6e974d17be8d6ccc6d7f01f2747789b37e48461c862666542957fb299cda415c9aecda8885110254c5d0b7ad45768f6f82c6d85856ab430717a0db89a0db5
|
7
|
+
data.tar.gz: 6e093a601037c58be6d04d96c9b2965099a084285cc7ce80908dfaad1e6515ddd007172b96d2e6e8e3d8f9702d7af4bd5dca82041fa362887ae3d170aed4c5ca
|
data/lib/delayed/backend/base.rb
CHANGED
@@ -231,8 +231,7 @@ module Delayed
|
|
231
231
|
# Uses an exponential scale depending on the number of failed attempts.
|
232
232
|
def reschedule(error = nil, time = nil)
|
233
233
|
begin
|
234
|
-
|
235
|
-
return_code = obj.on_failure(error) if obj.respond_to?(:on_failure)
|
234
|
+
return_code = invoke_payload_object_cb(:on_failure, error)
|
236
235
|
rescue
|
237
236
|
# don't allow a failed deserialization to prevent rescheduling
|
238
237
|
end
|
@@ -254,8 +253,7 @@ module Delayed
|
|
254
253
|
def permanent_failure(error)
|
255
254
|
begin
|
256
255
|
# notify the payload_object of a permanent failure
|
257
|
-
|
258
|
-
obj.on_permanent_failure(error) if obj.respond_to?(:on_permanent_failure)
|
256
|
+
invoke_payload_object_cb(:on_permanent_failure, error)
|
259
257
|
rescue
|
260
258
|
# don't allow a failed deserialization to prevent destroying the job
|
261
259
|
end
|
@@ -410,6 +408,11 @@ module Delayed
|
|
410
408
|
md[1].constantize
|
411
409
|
end
|
412
410
|
|
411
|
+
def invoke_payload_object_cb(method, ...)
|
412
|
+
obj = payload_object
|
413
|
+
obj.public_send(method, ...) if obj.respond_to?(method)
|
414
|
+
end
|
415
|
+
|
413
416
|
public
|
414
417
|
|
415
418
|
def initialize_defaults
|
@@ -21,6 +21,8 @@ module Delayed
|
|
21
21
|
self.permanent_fail_cb = on_permanent_failure
|
22
22
|
self.sender_is_object = sender.equal?(object)
|
23
23
|
self.sender_is_class = sender.is_a?(object.class)
|
24
|
+
# bypass visibility checks (see MessageSending#__calculate_sender_for_delay)
|
25
|
+
self.sender_is_object = true if sender.nil?
|
24
26
|
end
|
25
27
|
|
26
28
|
def display_name
|
data/lib/delayed/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inst-jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-08-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|