Normalize task args & kwargs for uniqueness/locking
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 95
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 1
Description
As @wojcikstefan pointed out, a task t(x) would have a different ID used for uniqueness and locking depending on whether it was used queued as t(x=1) or t(1), since the arg would either be in args or in kwargs.
This applies to unique and lock_key (see e.g. https://github.com/closeio/tasktiger/blob/master/tasktiger/worker.py#L820-L825).
We should find a way to normalize the task lock IDs.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in worker.py around lines 820-825, where uniqueness and locking IDs are referenced, and trace how task args and kwargs are used to form those IDs. Determine the normalization behavior for equivalent positional and keyword calls, then verify that unique and lock_key produce the same IDs for both forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, redis
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100