acidic_job 0.8.5 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +3 -3
- data/.rubocop.yml +4 -1
- data/.tool-versions +1 -1
- data/Gemfile.lock +111 -110
- data/README.md +18 -1
- data/gemfiles/rails_6.1_sidekiq_7.0.gemfile +10 -0
- data/gemfiles/rails_7.0_sidekiq_7.0.gemfile +10 -0
- data/gemfiles/rails_7.1_sidekiq_7.0.gemfile +10 -0
- data/lib/acidic_job/perform_wrapper.rb +1 -1
- data/lib/acidic_job/{rails.rb → railtie.rb} +1 -1
- data/lib/acidic_job/run.rb +21 -4
- data/lib/acidic_job/version.rb +1 -1
- data/lib/acidic_job.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 153e6365b6a1f1fd5aafca127047a04571c0c9a45f3320c4e17c347b7cbe84b8
|
|
4
|
+
data.tar.gz: 94238767a6f1d7066650ac117cdc7eff2cc2aac88f643b697391c411477dc1e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d55ffb8c2888bb83188042a74bf95b90d70dd4c541e92308f7f1e7008f13a63261e635fe280ea1f191fd4f6645e4ed99cfe26c3e63ac3d7b61b60fb1fde9ac0c
|
|
7
|
+
data.tar.gz: d773d20887dcf3894bb005a827c8a2ccb80bb1392a34290ddf6cc4e8afaf703b331c56b1246d9059c58900cdc12a23e678b2ef1cc89537878b914a932b9f495c
|
data/.github/workflows/main.yml
CHANGED
|
@@ -9,9 +9,9 @@ jobs:
|
|
|
9
9
|
strategy:
|
|
10
10
|
fail-fast: false
|
|
11
11
|
matrix:
|
|
12
|
-
ruby: ["2.7", "3.0", "3.1"]
|
|
12
|
+
ruby: ["2.7", "3.0", "3.1", "3.2"]
|
|
13
13
|
rails: ["6.1", "7.0"]
|
|
14
|
-
sidekiq: ["6.4", "6.5"]
|
|
14
|
+
sidekiq: ["6.4", "6.5", "7.0"]
|
|
15
15
|
services:
|
|
16
16
|
redis:
|
|
17
17
|
image: redis
|
|
@@ -27,7 +27,7 @@ jobs:
|
|
|
27
27
|
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}_sidekiq_${{ matrix.sidekiq }}.gemfile
|
|
28
28
|
|
|
29
29
|
steps:
|
|
30
|
-
- uses: actions/checkout@
|
|
30
|
+
- uses: actions/checkout@v3
|
|
31
31
|
|
|
32
32
|
- name: Set up Ruby
|
|
33
33
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
data/.rubocop.yml
CHANGED
|
@@ -13,6 +13,9 @@ Style/StringLiteralsInInterpolation:
|
|
|
13
13
|
Layout/LineLength:
|
|
14
14
|
Max: 120
|
|
15
15
|
|
|
16
|
+
Gemspec/DevelopmentDependencies:
|
|
17
|
+
Enabled: false
|
|
18
|
+
|
|
16
19
|
Style/Documentation:
|
|
17
20
|
Enabled: false
|
|
18
21
|
|
|
@@ -35,4 +38,4 @@ Metrics/PerceivedComplexity:
|
|
|
35
38
|
Enabled: false
|
|
36
39
|
|
|
37
40
|
Metrics/ClassLength:
|
|
38
|
-
Enabled: false
|
|
41
|
+
Enabled: false
|
data/.tool-versions
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ruby 3.1.
|
|
1
|
+
ruby 3.1.4
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
acidic_job (0.8.
|
|
4
|
+
acidic_job (0.8.7)
|
|
5
5
|
activejob
|
|
6
6
|
activerecord
|
|
7
7
|
activesupport
|
|
@@ -9,94 +9,94 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
actioncable (7.0.3
|
|
13
|
-
actionpack (= 7.0.3
|
|
14
|
-
activesupport (= 7.0.3
|
|
12
|
+
actioncable (7.0.4.3)
|
|
13
|
+
actionpack (= 7.0.4.3)
|
|
14
|
+
activesupport (= 7.0.4.3)
|
|
15
15
|
nio4r (~> 2.0)
|
|
16
16
|
websocket-driver (>= 0.6.1)
|
|
17
|
-
actionmailbox (7.0.3
|
|
18
|
-
actionpack (= 7.0.3
|
|
19
|
-
activejob (= 7.0.3
|
|
20
|
-
activerecord (= 7.0.3
|
|
21
|
-
activestorage (= 7.0.3
|
|
22
|
-
activesupport (= 7.0.3
|
|
17
|
+
actionmailbox (7.0.4.3)
|
|
18
|
+
actionpack (= 7.0.4.3)
|
|
19
|
+
activejob (= 7.0.4.3)
|
|
20
|
+
activerecord (= 7.0.4.3)
|
|
21
|
+
activestorage (= 7.0.4.3)
|
|
22
|
+
activesupport (= 7.0.4.3)
|
|
23
23
|
mail (>= 2.7.1)
|
|
24
24
|
net-imap
|
|
25
25
|
net-pop
|
|
26
26
|
net-smtp
|
|
27
|
-
actionmailer (7.0.3
|
|
28
|
-
actionpack (= 7.0.3
|
|
29
|
-
actionview (= 7.0.3
|
|
30
|
-
activejob (= 7.0.3
|
|
31
|
-
activesupport (= 7.0.3
|
|
27
|
+
actionmailer (7.0.4.3)
|
|
28
|
+
actionpack (= 7.0.4.3)
|
|
29
|
+
actionview (= 7.0.4.3)
|
|
30
|
+
activejob (= 7.0.4.3)
|
|
31
|
+
activesupport (= 7.0.4.3)
|
|
32
32
|
mail (~> 2.5, >= 2.5.4)
|
|
33
33
|
net-imap
|
|
34
34
|
net-pop
|
|
35
35
|
net-smtp
|
|
36
36
|
rails-dom-testing (~> 2.0)
|
|
37
|
-
actionpack (7.0.3
|
|
38
|
-
actionview (= 7.0.3
|
|
39
|
-
activesupport (= 7.0.3
|
|
37
|
+
actionpack (7.0.4.3)
|
|
38
|
+
actionview (= 7.0.4.3)
|
|
39
|
+
activesupport (= 7.0.4.3)
|
|
40
40
|
rack (~> 2.0, >= 2.2.0)
|
|
41
41
|
rack-test (>= 0.6.3)
|
|
42
42
|
rails-dom-testing (~> 2.0)
|
|
43
43
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
44
|
-
actiontext (7.0.3
|
|
45
|
-
actionpack (= 7.0.3
|
|
46
|
-
activerecord (= 7.0.3
|
|
47
|
-
activestorage (= 7.0.3
|
|
48
|
-
activesupport (= 7.0.3
|
|
44
|
+
actiontext (7.0.4.3)
|
|
45
|
+
actionpack (= 7.0.4.3)
|
|
46
|
+
activerecord (= 7.0.4.3)
|
|
47
|
+
activestorage (= 7.0.4.3)
|
|
48
|
+
activesupport (= 7.0.4.3)
|
|
49
49
|
globalid (>= 0.6.0)
|
|
50
50
|
nokogiri (>= 1.8.5)
|
|
51
|
-
actionview (7.0.3
|
|
52
|
-
activesupport (= 7.0.3
|
|
51
|
+
actionview (7.0.4.3)
|
|
52
|
+
activesupport (= 7.0.4.3)
|
|
53
53
|
builder (~> 3.1)
|
|
54
54
|
erubi (~> 1.4)
|
|
55
55
|
rails-dom-testing (~> 2.0)
|
|
56
56
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
57
|
-
activejob (7.0.3
|
|
58
|
-
activesupport (= 7.0.3
|
|
57
|
+
activejob (7.0.4.3)
|
|
58
|
+
activesupport (= 7.0.4.3)
|
|
59
59
|
globalid (>= 0.3.6)
|
|
60
|
-
activemodel (7.0.3
|
|
61
|
-
activesupport (= 7.0.3
|
|
62
|
-
activerecord (7.0.3
|
|
63
|
-
activemodel (= 7.0.3
|
|
64
|
-
activesupport (= 7.0.3
|
|
65
|
-
activestorage (7.0.3
|
|
66
|
-
actionpack (= 7.0.3
|
|
67
|
-
activejob (= 7.0.3
|
|
68
|
-
activerecord (= 7.0.3
|
|
69
|
-
activesupport (= 7.0.3
|
|
60
|
+
activemodel (7.0.4.3)
|
|
61
|
+
activesupport (= 7.0.4.3)
|
|
62
|
+
activerecord (7.0.4.3)
|
|
63
|
+
activemodel (= 7.0.4.3)
|
|
64
|
+
activesupport (= 7.0.4.3)
|
|
65
|
+
activestorage (7.0.4.3)
|
|
66
|
+
actionpack (= 7.0.4.3)
|
|
67
|
+
activejob (= 7.0.4.3)
|
|
68
|
+
activerecord (= 7.0.4.3)
|
|
69
|
+
activesupport (= 7.0.4.3)
|
|
70
70
|
marcel (~> 1.0)
|
|
71
71
|
mini_mime (>= 1.1.0)
|
|
72
|
-
activesupport (7.0.3
|
|
72
|
+
activesupport (7.0.4.3)
|
|
73
73
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
74
74
|
i18n (>= 1.6, < 2)
|
|
75
75
|
minitest (>= 5.1)
|
|
76
76
|
tzinfo (~> 2.0)
|
|
77
|
-
addressable (2.8.
|
|
78
|
-
public_suffix (>= 2.0.2, <
|
|
77
|
+
addressable (2.8.4)
|
|
78
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
79
79
|
ast (2.4.2)
|
|
80
80
|
builder (3.2.4)
|
|
81
81
|
combustion (1.3.7)
|
|
82
82
|
activesupport (>= 3.0.0)
|
|
83
83
|
railties (>= 3.0.0)
|
|
84
84
|
thor (>= 0.14.6)
|
|
85
|
-
concurrent-ruby (1.
|
|
86
|
-
connection_pool (2.
|
|
85
|
+
concurrent-ruby (1.2.2)
|
|
86
|
+
connection_pool (2.4.0)
|
|
87
87
|
crass (1.0.6)
|
|
88
|
-
|
|
88
|
+
date (3.3.3)
|
|
89
89
|
docile (1.4.0)
|
|
90
90
|
domain_name (0.5.20190701)
|
|
91
91
|
unf (>= 0.0.5, < 1.0.0)
|
|
92
|
-
erubi (1.
|
|
92
|
+
erubi (1.12.0)
|
|
93
93
|
ffi (1.15.5)
|
|
94
94
|
ffi-compiler (1.0.1)
|
|
95
95
|
ffi (>= 1.0.0)
|
|
96
96
|
rake
|
|
97
|
-
globalid (1.
|
|
97
|
+
globalid (1.1.0)
|
|
98
98
|
activesupport (>= 5.0)
|
|
99
|
-
http (5.1.
|
|
99
|
+
http (5.1.1)
|
|
100
100
|
addressable (~> 2.8)
|
|
101
101
|
http-cookie (~> 1.0)
|
|
102
102
|
http-form_data (~> 2.2)
|
|
@@ -106,123 +106,124 @@ GEM
|
|
|
106
106
|
http-form_data (2.3.0)
|
|
107
107
|
i18n (1.12.0)
|
|
108
108
|
concurrent-ruby (~> 1.0)
|
|
109
|
-
json (2.6.
|
|
109
|
+
json (2.6.3)
|
|
110
110
|
llhttp-ffi (0.4.0)
|
|
111
111
|
ffi-compiler (~> 1.0)
|
|
112
112
|
rake (~> 13.0)
|
|
113
|
-
loofah (2.
|
|
113
|
+
loofah (2.20.0)
|
|
114
114
|
crass (~> 1.0.2)
|
|
115
115
|
nokogiri (>= 1.5.9)
|
|
116
|
-
mail (2.
|
|
116
|
+
mail (2.8.1)
|
|
117
117
|
mini_mime (>= 0.1.1)
|
|
118
|
+
net-imap
|
|
119
|
+
net-pop
|
|
120
|
+
net-smtp
|
|
118
121
|
marcel (1.0.2)
|
|
119
122
|
method_source (1.0.0)
|
|
120
123
|
mini_mime (1.1.2)
|
|
121
|
-
mini_portile2 (2.8.
|
|
122
|
-
minitest (5.
|
|
123
|
-
net-imap (0.
|
|
124
|
-
|
|
124
|
+
mini_portile2 (2.8.1)
|
|
125
|
+
minitest (5.18.0)
|
|
126
|
+
net-imap (0.3.4)
|
|
127
|
+
date
|
|
125
128
|
net-protocol
|
|
126
|
-
|
|
127
|
-
net-pop (0.1.1)
|
|
128
|
-
digest
|
|
129
|
+
net-pop (0.1.2)
|
|
129
130
|
net-protocol
|
|
131
|
+
net-protocol (0.2.1)
|
|
130
132
|
timeout
|
|
131
|
-
net-
|
|
132
|
-
timeout
|
|
133
|
-
net-smtp (0.3.1)
|
|
134
|
-
digest
|
|
133
|
+
net-smtp (0.3.3)
|
|
135
134
|
net-protocol
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
nokogiri (1.13.7)
|
|
135
|
+
nio4r (2.5.9)
|
|
136
|
+
nokogiri (1.14.3)
|
|
139
137
|
mini_portile2 (~> 2.8.0)
|
|
140
138
|
racc (~> 1.4)
|
|
141
|
-
nokogiri (1.
|
|
139
|
+
nokogiri (1.14.3-x86_64-darwin)
|
|
142
140
|
racc (~> 1.4)
|
|
143
|
-
noticed (1.
|
|
141
|
+
noticed (1.6.0)
|
|
144
142
|
http (>= 4.0.0)
|
|
145
143
|
rails (>= 5.2.0)
|
|
146
144
|
parallel (1.22.1)
|
|
147
|
-
parser (3.
|
|
145
|
+
parser (3.2.2.0)
|
|
148
146
|
ast (~> 2.4.1)
|
|
149
|
-
public_suffix (
|
|
150
|
-
racc (1.6.
|
|
151
|
-
rack (2.2.4)
|
|
152
|
-
rack-test (2.0
|
|
147
|
+
public_suffix (5.0.1)
|
|
148
|
+
racc (1.6.2)
|
|
149
|
+
rack (2.2.6.4)
|
|
150
|
+
rack-test (2.1.0)
|
|
153
151
|
rack (>= 1.3)
|
|
154
|
-
rails (7.0.3
|
|
155
|
-
actioncable (= 7.0.3
|
|
156
|
-
actionmailbox (= 7.0.3
|
|
157
|
-
actionmailer (= 7.0.3
|
|
158
|
-
actionpack (= 7.0.3
|
|
159
|
-
actiontext (= 7.0.3
|
|
160
|
-
actionview (= 7.0.3
|
|
161
|
-
activejob (= 7.0.3
|
|
162
|
-
activemodel (= 7.0.3
|
|
163
|
-
activerecord (= 7.0.3
|
|
164
|
-
activestorage (= 7.0.3
|
|
165
|
-
activesupport (= 7.0.3
|
|
152
|
+
rails (7.0.4.3)
|
|
153
|
+
actioncable (= 7.0.4.3)
|
|
154
|
+
actionmailbox (= 7.0.4.3)
|
|
155
|
+
actionmailer (= 7.0.4.3)
|
|
156
|
+
actionpack (= 7.0.4.3)
|
|
157
|
+
actiontext (= 7.0.4.3)
|
|
158
|
+
actionview (= 7.0.4.3)
|
|
159
|
+
activejob (= 7.0.4.3)
|
|
160
|
+
activemodel (= 7.0.4.3)
|
|
161
|
+
activerecord (= 7.0.4.3)
|
|
162
|
+
activestorage (= 7.0.4.3)
|
|
163
|
+
activesupport (= 7.0.4.3)
|
|
166
164
|
bundler (>= 1.15.0)
|
|
167
|
-
railties (= 7.0.3
|
|
165
|
+
railties (= 7.0.4.3)
|
|
168
166
|
rails-dom-testing (2.0.3)
|
|
169
167
|
activesupport (>= 4.2.0)
|
|
170
168
|
nokogiri (>= 1.6)
|
|
171
|
-
rails-html-sanitizer (1.
|
|
172
|
-
loofah (~> 2.
|
|
173
|
-
railties (7.0.3
|
|
174
|
-
actionpack (= 7.0.3
|
|
175
|
-
activesupport (= 7.0.3
|
|
169
|
+
rails-html-sanitizer (1.5.0)
|
|
170
|
+
loofah (~> 2.19, >= 2.19.1)
|
|
171
|
+
railties (7.0.4.3)
|
|
172
|
+
actionpack (= 7.0.4.3)
|
|
173
|
+
activesupport (= 7.0.4.3)
|
|
176
174
|
method_source
|
|
177
175
|
rake (>= 12.2)
|
|
178
176
|
thor (~> 1.0)
|
|
179
177
|
zeitwerk (~> 2.5)
|
|
180
178
|
rainbow (3.1.1)
|
|
181
179
|
rake (13.0.6)
|
|
182
|
-
redis (
|
|
183
|
-
|
|
180
|
+
redis-client (0.14.1)
|
|
181
|
+
connection_pool
|
|
182
|
+
regexp_parser (2.8.0)
|
|
184
183
|
rexml (3.2.5)
|
|
185
|
-
rubocop (1.
|
|
184
|
+
rubocop (1.50.2)
|
|
186
185
|
json (~> 2.3)
|
|
187
186
|
parallel (~> 1.10)
|
|
188
|
-
parser (>= 3.
|
|
187
|
+
parser (>= 3.2.0.0)
|
|
189
188
|
rainbow (>= 2.2.2, < 4.0)
|
|
190
189
|
regexp_parser (>= 1.8, < 3.0)
|
|
191
190
|
rexml (>= 3.2.5, < 4.0)
|
|
192
|
-
rubocop-ast (>= 1.
|
|
191
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
|
193
192
|
ruby-progressbar (~> 1.7)
|
|
194
|
-
unicode-display_width (>=
|
|
195
|
-
rubocop-ast (1.
|
|
196
|
-
parser (>= 3.
|
|
197
|
-
rubocop-minitest (0.
|
|
198
|
-
rubocop (>=
|
|
193
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
|
194
|
+
rubocop-ast (1.28.0)
|
|
195
|
+
parser (>= 3.2.1.0)
|
|
196
|
+
rubocop-minitest (0.30.0)
|
|
197
|
+
rubocop (>= 1.39, < 2.0)
|
|
199
198
|
rubocop-rake (0.6.0)
|
|
200
199
|
rubocop (~> 1.0)
|
|
201
|
-
ruby-progressbar (1.
|
|
202
|
-
sidekiq (
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
200
|
+
ruby-progressbar (1.13.0)
|
|
201
|
+
sidekiq (7.0.8)
|
|
202
|
+
concurrent-ruby (< 2)
|
|
203
|
+
connection_pool (>= 2.3.0)
|
|
204
|
+
rack (>= 2.2.4)
|
|
205
|
+
redis-client (>= 0.11.0)
|
|
206
|
+
simplecov (0.22.0)
|
|
207
207
|
docile (~> 1.1)
|
|
208
208
|
simplecov-html (~> 0.11)
|
|
209
209
|
simplecov_json_formatter (~> 0.1)
|
|
210
210
|
simplecov-html (0.12.3)
|
|
211
211
|
simplecov_json_formatter (0.1.4)
|
|
212
|
-
sqlite3 (1.
|
|
213
|
-
|
|
212
|
+
sqlite3 (1.6.2)
|
|
213
|
+
mini_portile2 (~> 2.8.0)
|
|
214
|
+
sqlite3 (1.6.2-x86_64-darwin)
|
|
214
215
|
thor (1.2.1)
|
|
215
|
-
timeout (0.3.
|
|
216
|
-
tzinfo (2.0.
|
|
216
|
+
timeout (0.3.2)
|
|
217
|
+
tzinfo (2.0.6)
|
|
217
218
|
concurrent-ruby (~> 1.0)
|
|
218
219
|
unf (0.1.4)
|
|
219
220
|
unf_ext
|
|
220
221
|
unf_ext (0.0.8.2)
|
|
221
|
-
unicode-display_width (2.2
|
|
222
|
+
unicode-display_width (2.4.2)
|
|
222
223
|
websocket-driver (0.7.5)
|
|
223
224
|
websocket-extensions (>= 0.1.0)
|
|
224
225
|
websocket-extensions (0.1.5)
|
|
225
|
-
zeitwerk (2.6.
|
|
226
|
+
zeitwerk (2.6.7)
|
|
226
227
|
|
|
227
228
|
PLATFORMS
|
|
228
229
|
ruby
|
data/README.md
CHANGED
|
@@ -238,7 +238,7 @@ class RideCreateJob < AcidicJob::Base
|
|
|
238
238
|
end
|
|
239
239
|
|
|
240
240
|
def create_ride_and_audit_record
|
|
241
|
-
self.ride =
|
|
241
|
+
self.ride = @user.rides.create(@params)
|
|
242
242
|
end
|
|
243
243
|
|
|
244
244
|
def create_stripe_charge
|
|
@@ -419,6 +419,23 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
|
419
419
|
|
|
420
420
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
421
421
|
|
|
422
|
+
You can run a specific combination of Rails version and Sidekiq version using one of the Gemfiles defined in the `/gemfiles` directory via the `BUNDLE_GEMFILE` ENV variable, e.g.:
|
|
423
|
+
```sh
|
|
424
|
+
BUNDLE_GEMFILE=gemfiles/rails_7.0_sidekiq_6.5.gemfile bundle exec rake test
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
You can likewise test only one particular test file using the `TEST` ENV variable, e.g.:
|
|
428
|
+
```sh
|
|
429
|
+
TEST=test/acidic_job/extensions/noticed_test.rb
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
Finally, if you need to only run one particular test case itself, use the `TESTOPTS` ENV variable with the `--name` option, e.g.:
|
|
433
|
+
```sh
|
|
434
|
+
TESTOPTS="--name=test_deliver_acidicly_on_noticed_notification_with_only_database_delivery"
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
These options can of course be combined to help narrow down your debugging when you find a failing test in CI.
|
|
438
|
+
|
|
422
439
|
## Contributing
|
|
423
440
|
|
|
424
441
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/acidic_job.
|
|
@@ -4,7 +4,7 @@ module AcidicJob
|
|
|
4
4
|
# NOTE: it is essential that this be a bare module and not an ActiveSupport::Concern
|
|
5
5
|
# WHY?
|
|
6
6
|
module PerformWrapper
|
|
7
|
-
def perform(*args)
|
|
7
|
+
ruby2_keywords def perform(*args)
|
|
8
8
|
@arguments = args
|
|
9
9
|
|
|
10
10
|
# we don't want to run the `perform` callbacks twice, since ActiveJob already handles that for us
|
data/lib/acidic_job/run.rb
CHANGED
|
@@ -15,6 +15,10 @@ module AcidicJob
|
|
|
15
15
|
STAGED_JOB_ID_PREFIX = "STG"
|
|
16
16
|
STAGED_JOB_ID_DELIMITER = "__"
|
|
17
17
|
IDEMPOTENCY_KEY_LOCK_TIMEOUT_SECONDS = 2
|
|
18
|
+
RAILS_VERSION = Gem::Version.new(Rails.version)
|
|
19
|
+
TARGET_VERSION = Gem::Version.new("7.1")
|
|
20
|
+
REQUIRES_CODER_FOR_SERIALIZE = RAILS_VERSION >= TARGET_VERSION ||
|
|
21
|
+
RAILS_VERSION.segments[..1] == TARGET_VERSION.segments
|
|
18
22
|
|
|
19
23
|
self.table_name = "acidic_job_runs"
|
|
20
24
|
|
|
@@ -47,7 +51,11 @@ module AcidicJob
|
|
|
47
51
|
|
|
48
52
|
after_update_commit :proceed_with_parent, if: :finished?
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
if REQUIRES_CODER_FOR_SERIALIZE
|
|
55
|
+
serialize :returning_to, coder: AcidicJob::Serializer
|
|
56
|
+
else
|
|
57
|
+
serialize :returning_to, AcidicJob::Serializer
|
|
58
|
+
end
|
|
51
59
|
end
|
|
52
60
|
|
|
53
61
|
class_methods do
|
|
@@ -142,8 +150,13 @@ module AcidicJob
|
|
|
142
150
|
|
|
143
151
|
concerning :Workflowable do
|
|
144
152
|
included do
|
|
145
|
-
|
|
146
|
-
|
|
153
|
+
if REQUIRES_CODER_FOR_SERIALIZE
|
|
154
|
+
serialize :workflow, coder: AcidicJob::Serializer
|
|
155
|
+
serialize :error_object, coder: AcidicJob::Serializer
|
|
156
|
+
else
|
|
157
|
+
serialize :workflow, AcidicJob::Serializer
|
|
158
|
+
serialize :error_object, AcidicJob::Serializer
|
|
159
|
+
end
|
|
147
160
|
store :attr_accessors, coder: AcidicJob::Serializer
|
|
148
161
|
|
|
149
162
|
with_options unless: :staged? do
|
|
@@ -188,7 +201,11 @@ module AcidicJob
|
|
|
188
201
|
|
|
189
202
|
concerning :Jobbable do
|
|
190
203
|
included do
|
|
191
|
-
|
|
204
|
+
if REQUIRES_CODER_FOR_SERIALIZE
|
|
205
|
+
serialize :serialized_job, coder: JSON
|
|
206
|
+
else
|
|
207
|
+
serialize :serialized_job, JSON
|
|
208
|
+
end
|
|
192
209
|
|
|
193
210
|
validates :serialized_job, presence: true
|
|
194
211
|
validates :job_class, presence: true
|
data/lib/acidic_job/version.rb
CHANGED
data/lib/acidic_job.rb
CHANGED
|
@@ -31,7 +31,7 @@ require_relative "acidic_job/serializers/recovery_point_serializer"
|
|
|
31
31
|
require_relative "acidic_job/serializers/worker_serializer"
|
|
32
32
|
require_relative "acidic_job/serializers/active_kiq_serializer"
|
|
33
33
|
|
|
34
|
-
require_relative "acidic_job/
|
|
34
|
+
require_relative "acidic_job/railtie"
|
|
35
35
|
|
|
36
36
|
module AcidicJob
|
|
37
37
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: acidic_job
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- fractaledmind
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-06-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activejob
|
|
@@ -245,10 +245,13 @@ files:
|
|
|
245
245
|
- combustion/log/test.log
|
|
246
246
|
- gemfiles/rails_6.1_sidekiq_6.4.gemfile
|
|
247
247
|
- gemfiles/rails_6.1_sidekiq_6.5.gemfile
|
|
248
|
+
- gemfiles/rails_6.1_sidekiq_7.0.gemfile
|
|
248
249
|
- gemfiles/rails_7.0_sidekiq_6.4.gemfile
|
|
249
250
|
- gemfiles/rails_7.0_sidekiq_6.5.gemfile
|
|
251
|
+
- gemfiles/rails_7.0_sidekiq_7.0.gemfile
|
|
250
252
|
- gemfiles/rails_7.1_sidekiq_6.4.gemfile
|
|
251
253
|
- gemfiles/rails_7.1_sidekiq_6.5.gemfile
|
|
254
|
+
- gemfiles/rails_7.1_sidekiq_7.0.gemfile
|
|
252
255
|
- lib/acidic_job.rb
|
|
253
256
|
- lib/acidic_job/active_kiq.rb
|
|
254
257
|
- lib/acidic_job/arguments.rb
|
|
@@ -264,7 +267,7 @@ files:
|
|
|
264
267
|
- lib/acidic_job/perform_acidicly.rb
|
|
265
268
|
- lib/acidic_job/perform_wrapper.rb
|
|
266
269
|
- lib/acidic_job/processor.rb
|
|
267
|
-
- lib/acidic_job/
|
|
270
|
+
- lib/acidic_job/railtie.rb
|
|
268
271
|
- lib/acidic_job/recovery_point.rb
|
|
269
272
|
- lib/acidic_job/run.rb
|
|
270
273
|
- lib/acidic_job/serializer.rb
|
|
@@ -308,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
308
311
|
- !ruby/object:Gem::Version
|
|
309
312
|
version: '0'
|
|
310
313
|
requirements: []
|
|
311
|
-
rubygems_version: 3.3.
|
|
314
|
+
rubygems_version: 3.3.26
|
|
312
315
|
signing_key:
|
|
313
316
|
specification_version: 4
|
|
314
317
|
summary: Idempotent operations for Rails apps, built on top of ActiveJob.
|