Commit 0c81c77
committed
Support recurring jobs that defer enqueuing to after commit always
These need to be enqueued within the transaction that creates the
recurring execution to avoid duplicate crons. However, if the job is
set to `enqueue_after_transaction_commit = :always` or :default when we
change the default, it won't work because we'll try to create the
recurring execution without having actually enqueued the job. With this
change, we bypass Active Job's enqueuing and enqueue directly with Solid
Queue, running enqueue callbacks.1 parent 89d30c7 commit 0c81c77
File tree
2 files changed
+11
-4
lines changed- app/models/solid_queue
2 files changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| |||
0 commit comments