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.
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
defer cancel()