mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #649] [FEATURE REQUEST] Support rescheduling a task #321
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#321
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @robinjoseph08 on GitHub (Apr 27, 2023).
Original GitHub issue: https://github.com/hibiken/asynq/issues/649
Originally assigned to: @hibiken on GitHub.
Is your feature request related to a problem? Please describe.
From what I can tell, there doesn't seem to be a way to reschedule a task i.e. create a task with a specific value for
asynq.Process{At,In}and afterward, be able to have it run at another given time.Describe the solution you'd like
Exposing a function either on the
Clientor on theInspectorthat allows for this functionality, similar toInspector.DeleteTask.Describe alternatives you've considered
While it's possible to delete the existing task and then create a new one with the new time, it would be nice to preserve the task ID. We maintain a reference to the ID (so that we can delete/reschedule/etc.), and it would be nice to not have to update the IDs when we need to reschedule it, and rescheduling seems like reasonable functionality for a package that handles delayed tasks.
@reechou commented on GitHub (Jun 12, 2023):
I need this FEATURE too. @hibiken
@Enan01 commented on GitHub (Nov 4, 2024):
i need too.
@kamikazechaser commented on GitHub (Nov 5, 2024):
I think there are a couple workarounds to achieve this effect using the current state of the library. Within the task handler itself, you could requeue the same task (callback like style) preserving any metadata as is (including the task ID) and modifying the next processIn/At time.