delayed 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/delayed/active_job_adapter.rb +0 -30
- data/lib/delayed/job_wrapper.rb +31 -0
- data/lib/delayed.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac86a8d4576b55da967457fefbe6576b1cb2aa894d1015bd4e9883beb25a14cf
|
4
|
+
data.tar.gz: 1db2668da101214ff8ad304931de54a5b348a54dee991eac6535fd117a14af90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b07f547dbc8087465a79dbad0e75170d720d7f942b573dab337666f244ace82f2de08b52aee12e20038ec88594a103385de21abf3f439aabe4e2404bdf45d75a
|
7
|
+
data.tar.gz: d2144160713def9d49398a99cb99e3def26cc5beea91d9f0ee832533ba91569b9c9642e00de44ce23eb4e85318c3bbaf34b02f4f478fb3dd85340d0eff09f627
|
@@ -36,34 +36,4 @@ module Delayed
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
39
|
-
|
40
|
-
class JobWrapper # rubocop:disable Betterment/ActiveJobPerformable
|
41
|
-
attr_accessor :job_data
|
42
|
-
|
43
|
-
delegate_missing_to :job
|
44
|
-
|
45
|
-
def initialize(job_data)
|
46
|
-
@job_data = job_data
|
47
|
-
end
|
48
|
-
|
49
|
-
def display_name
|
50
|
-
job_data['job_class']
|
51
|
-
end
|
52
|
-
|
53
|
-
def perform
|
54
|
-
ActiveJob::Callbacks.run_callbacks(:execute) do
|
55
|
-
job.perform_now
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
def encode_with(coder)
|
60
|
-
coder['job_data'] = @job_data
|
61
|
-
end
|
62
|
-
|
63
|
-
private
|
64
|
-
|
65
|
-
def job
|
66
|
-
@job ||= ActiveJob::Base.deserialize(job_data) if job_data
|
67
|
-
end
|
68
|
-
end
|
69
39
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Delayed
|
2
|
+
class JobWrapper # rubocop:disable Betterment/ActiveJobPerformable
|
3
|
+
attr_accessor :job_data
|
4
|
+
|
5
|
+
delegate_missing_to :job
|
6
|
+
|
7
|
+
def initialize(job_data)
|
8
|
+
@job_data = job_data
|
9
|
+
end
|
10
|
+
|
11
|
+
def display_name
|
12
|
+
job_data['job_class']
|
13
|
+
end
|
14
|
+
|
15
|
+
def perform
|
16
|
+
ActiveJob::Callbacks.run_callbacks(:execute) do
|
17
|
+
job.perform_now
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def encode_with(coder)
|
22
|
+
coder['job_data'] = @job_data
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def job
|
28
|
+
@job ||= ActiveJob::Base.deserialize(job_data) if job_data
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/delayed.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Griffith
|
@@ -19,7 +19,7 @@ authors:
|
|
19
19
|
autorequire:
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
|
-
date: 2023-10-
|
22
|
+
date: 2023-10-19 00:00:00.000000000 Z
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|
25
25
|
name: activerecord
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- lib/delayed/backend/job_preparer.rb
|
73
73
|
- lib/delayed/engine.rb
|
74
74
|
- lib/delayed/exceptions.rb
|
75
|
+
- lib/delayed/job_wrapper.rb
|
75
76
|
- lib/delayed/lifecycle.rb
|
76
77
|
- lib/delayed/message_sending.rb
|
77
78
|
- lib/delayed/monitor.rb
|