Commit be1a5bc
committed
Set
Even though this will be overwritten by Active Job when called through
`perform_later`.
This is necessary for recurring tasks, where we run the `enqueue`
callbacks manually and call `Job.enqueue`. We rely on `successfully_enqueued?`
to know whether we need to record the recurring execution. We were setting
that no matter what after calling `Job.enqueue` because we were relying on
that to raise (which would be the case for Active Record errors).
In the case of discarding it because of concurrency controls, the job is simply
not persisted but no error is raised, which means we were trying to
record a recurring execution without a persisted job, which would raise.
Fixes #598successfully_enqueued in Job.enqueue
1 parent 2a307e4 commit be1a5bc
File tree
3 files changed
+31
-5
lines changed- app/models/solid_queue
- test/models/solid_queue
3 files changed
+31
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | 133 | | |
135 | 134 | | |
136 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
44 | 52 | | |
45 | 53 | | |
46 | 54 | | |
| |||
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
91 | 113 | | |
92 | 114 | | |
93 | 115 | | |
| |||
174 | 196 | | |
175 | 197 | | |
176 | 198 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 199 | + | |
181 | 200 | | |
182 | 201 | | |
183 | 202 | | |
| |||
192 | 211 | | |
193 | 212 | | |
194 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
195 | 221 | | |
0 commit comments