hibiken / asynq

Simple, reliable, and efficient distributed task queue in Go
MIT License
10.03k stars 716 forks source link

Call all context cancelFunc in processor.go #926

Closed pior closed 3 weeks ago

pior commented 3 weeks ago

Context

Similar change as https://github.com/hibiken/asynq/pull/145

We are potentially leaking context goroutines in requeue(), markAsComplete(), markAsDone(), retry(), archive() methods.

Those methods are not doing anything weird with the context, they are simply calling r.runScript(ctx, ...), we can safely cancel this context as usual.

Changes

kamikazechaser commented 3 weeks ago

Benchstat CI is failing, but that is not necessary for this change.