Skip to content

Inconsistency with countdown #53

Description

@laxusgooee

I have a task:

@shared_task(bind=True, base=Singleton, lock_expiry=10, raise_on_duplicate=True)
def encode_posts(self):
    # do some things, which might take longer than 15s, in which case call encode_posts.apply_async() else:
    encode_posts.apply_async(countdown=15)

the problem is, sometimes the code runs as I want it, i.e. runs every 15s. Other times it raises the duplicate exception.

What I want is to release the lock before calling encode_posts.apply_async(countdown=15)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions