[PR #988] Allow cancel without retry #2982

Open
opened 2026-03-15 21:13:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynq/pull/988
Author: @thedmdim
Created: 12/16/2024
Status: 🔄 Open

Base: masterHead: master


📝 Commits (1)

  • 35edb02 allow cancel without retry

📊 Changes

1 file changed (+12 additions, -9 deletions)

View changed files

📝 processor.go (+12 -9)

📄 Description

Previously we couldn't cancel task without sending it to retry queue. Despite the fact that handler returned SkipRetry error, it didn't work correctly. Read from <-ctx.Done() in processor.go:246 caused by canelation were and will be always earlier than returned SkipRetry from 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 :)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hibiken/asynq/pull/988 **Author:** [@thedmdim](https://github.com/thedmdim) **Created:** 12/16/2024 **Status:** 🔄 Open **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`35edb02`](https://github.com/hibiken/asynq/commit/35edb0281b70ad6451a505170e6bf8926ba14c7c) allow cancel without retry ### 📊 Changes **1 file changed** (+12 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `processor.go` (+12 -9) </details> ### 📄 Description Previously we couldn't cancel task without sending it to retry queue. Despite the fact that handler returned `SkipRetry` error, it didn't work correctly. Read from `<-ctx.Done()` in `processor.go:246` caused by canelation were and will be always earlier than returned `SkipRetry` from 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 :) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#2982
No description provided.