mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 15:35:55 +03:00
[GH-ISSUE #653] How to prevent duplicate scheduler task registe across multiple Asynq server nodes #323
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#323
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 @wwwfeng on GitHub (May 4, 2023).
Original GitHub issue: https://github.com/hibiken/asynq/issues/653
How to prevent duplicate scheduler task registe across multiple Asynq server nodes
@wwwfeng commented on GitHub (May 4, 2023):
I have the following code, but if multiple instances of asynq are started, the scheduled task may be registered to Redis repeatedly. How to avoid this?
@aaps3579 commented on GitHub (May 8, 2023):
@wwwfeng Yes. If multiple instances of scheduler are started, task will be scheduled multiple times.
Refer to this thread https://github.com/hibiken/asynq/issues/395 for solution.
@wwwfeng commented on GitHub (May 8, 2023):
Thanks for your reply. I checked the documentation and used
asynq.TaskIDandasynq.Retention, and it seems to be effective. Does this mean that the same scheduled task will only be written once within the time set by asynq.Retention?@aaps3579 commented on GitHub (May 8, 2023):
Retention time dictates for how much long task is gonna stay in the system. And any task enqueued with same taskID will give asynq.ErrTaskIDConflict error.
@wwwfeng commented on GitHub (May 8, 2023):
Thank you so much for your response.I understand now.