Commit 6f68086
authored
Fix race condition causing status not_found (#362)
Checking job status consited of three separate calls to Redis,
where the first one checked if result is present and the second
checked if job is in progress. If a job got completed between
these two calls Job.status() would erroneously return status
not_found.
The solution is to make all the calls to Redis in one transaction.1 parent 1f91c0b commit 6f68086
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
141 | 147 | | |
142 | | - | |
| 148 | + | |
143 | 149 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 150 | + | |
148 | 151 | | |
| 152 | + | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
0 commit comments