This fixes a race condition where the context might have been canceled or timed out in between the preliminary check and trying to dequeue, and consequently returning the wrong error. Instead of doing the preliminary check, just check for the context errors when trying to dequeue. |
||
|---|---|---|
| .. | ||
| dbjobqueue | ||
| jobqueue.go | ||