Commit 03ad132
fix(active_job): save and restore hub around job execution
This correctly handles all execution modes:
- Dedicated async workers (new thread, nil hub): clone -> restore nil
- Inline inside a Rack request (rack hub on thread): clone -> restore
rack hub so the HTTP response completes normally
- Thread-pool workers (recycled thread, stale hub): clone -> restore
stale hub (irrelevant; next job will clone again)
Co-Authored-By: github-copilot <noreply@example.com>1 parent 58f8913 commit 03ad132
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
| |||
142 | 149 | | |
143 | 150 | | |
144 | 151 | | |
| 152 | + | |
| 153 | + | |
145 | 154 | | |
146 | 155 | | |
147 | 156 | | |
| |||
0 commit comments