Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with bind=True and self arg #27

Open
Suor opened this issue Sep 9, 2020 · 1 comment
Open

Doesn't work with bind=True and self arg #27

Suor opened this issue Sep 9, 2020 · 1 comment
Labels

Comments

@Suor
Copy link
Contributor

Suor commented Sep 9, 2020

I get TypeError missing a required argument: 'user_pk', where user_pk is the last argument of the task:

@shared_task(bind=True, base=Singleton, unique_on=["some_pk"], lock_expiry=15 * 60, acks_late=True)
def do_stuff(self, some_pk, user_pk):
    # ...

The bug is in:

celery_singleton/singleton.py in generate_lock at line 64
            bound = sig.bind(*task_args, **task_kwargs).arguments
@steinitzu steinitzu added the bug label Sep 10, 2020
@elavaud
Copy link

elavaud commented Feb 23, 2023

Any workaround found so far?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants