Commit 18681cf
Clear clearable jobs in a loop instead of batching
ActiveRecord batching can be slow when looping over records filtered by
non-PKs. We don't care about the order of deletion here, so we can just use a loop
to delete the clearable jobs; this allows to achieve better performance
in general.1 parent e79b97b commit 18681cf
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
0 commit comments