closeio / closeio/tasktiger

Normalize task args & kwargs for uniqueness/locking

Open
#159 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.