[GH-ISSUE #634] [FEATURE REQUEST] Unique task option document enhancement #311

Open
opened 2026-03-02 05:20:23 +03:00 by kerem · 0 comments
Owner

Originally created by @jerroldgao on GitHub (Mar 29, 2023).
Original GitHub issue: https://github.com/hibiken/asynq/issues/634

Originally assigned to: @hibiken on GitHub.

Is your feature request related to a problem? Please describe.
Hello, hibiken. I am researching asynq and decide to use it in our tech stack. But I feel confused on the document, so I wish to clarify if I understand it clearly.

When I read the unique task option page. I felt confused why we have two different implementations of the unique tasks, isn't the Unique option just generate time as an id? And this largely depends on distributed system clock getting the same.

Also, I saw https://github.com/hibiken/asynq/issues/395#issuecomment-1030080017. Are you saying async.Unique(unique option) might get a problem when the task is processed quickly? Does the TaskID option have the same problem? If so, it could be a system clock problem there.

Describe the solution you'd like
A clear and concise description of what you want to happen.
That really depends on what the case will be at the end.

  1. If the Unique option has a system clock problem, then it shouldn't be used in a distributed system unless the system has strong consistency on the system clock, so the doc should add this notice.
  2. If the TaskID option has the same problem, then I doubt if we need those two options.
    Btw, I saw you have a benchmark test for the unique option and taskid option. Can you provide it within this page as well?
Originally created by @jerroldgao on GitHub (Mar 29, 2023). Original GitHub issue: https://github.com/hibiken/asynq/issues/634 Originally assigned to: @hibiken on GitHub. **Is your feature request related to a problem? Please describe.** Hello, hibiken. I am researching asynq and decide to use it in our tech stack. But I feel confused on the document, so I wish to clarify if I understand it clearly. When I read the unique task option [page](https://github.com/hibiken/asynq/wiki/Unique-Tasks). I felt confused why we have two different implementations of the unique tasks, isn't the Unique option just generate time as an id? And this largely depends on distributed system clock getting the same. Also, I saw https://github.com/hibiken/asynq/issues/395#issuecomment-1030080017. Are you saying `async.Unique`(unique option) might get a problem when the task is processed quickly? Does the `TaskID` option have the same problem? If so, it could be a [system clock problem](https://en.wikipedia.org/wiki/Clock_synchronization) there. **Describe the solution you'd like** A clear and concise description of what you want to happen. That really depends on what the case will be at the end. 1. If the Unique option has a system clock problem, then it shouldn't be used in a distributed system unless the system has strong consistency on the system clock, so the doc should add this notice. 2. If the TaskID option has the same problem, then I doubt if we need those two options. Btw, I saw you have a benchmark test for the unique option and taskid option. Can you provide it within this [page](https://github.com/hibiken/asynq/wiki/Unique-Tasks) as well?
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#311
No description provided.