Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #988 +/- ##
==========================================
- Coverage 67.13% 66.49% -0.65%
==========================================
Files 29 29
Lines 4300 5745 +1445
==========================================
+ Hits 2887 3820 +933
- Misses 1135 1643 +508
- Partials 278 282 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The downside of this approach is that every context cancellation will result in the task being cancelled.. There are some cases where you'd want a certain context cancellation to be retry-able. Right now every cancellation will be retried and I believe most users are used to this behaviour by now. With 1.20, this kind of checking is possible: https://pkg.go.dev/context#WithCancelCause coupled with I'd like to keep this PR open and have more discussions around it with more people before we agree on the best way to handle this. |
Previously we couldn't cancel task without sending it to retry queue. Despite the fact that handler returned
SkipRetryerror, it didn't work correctly. Read from<-ctx.Done()inprocessor.go:246caused by canelation were and will be always earlier than returnedSkipRetryfrom handler. That's why task always went to retry queue.With these changes you are able to cancel task so it will be archived instead of going to retry :)