8000 Redlock support automatic renewal? · Issue #371 · brainix/pottery · GitHub
[go: up one dir, main page]

Skip to content

Redlock support automatic renewal? #371

Open

Description

@centosredhat

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Activity

  1. self-assigned this
    on Mar 23, 2021
  2. clusterf commented on May 25, 2021

    @clusterf

    Is this planned to be added in the near future (for Redlock and syncronize)? It would be of tremendous help

  3. aabmets commented on Sep 15, 2025

    @aabmets

    For anyone who stumbles upon this issue, Redlock and AIORedlock in Pottery support extending locks.

    >>> async def main():
    ...     aioredis = AIORedis.from_url('redis://localhost:6379/1')
    ...     shower_lock = AIORedlock(key='shower', masters={aioredis})
    ...     await shower_lock.acquire()
    ...     print(math.ceil(await shower_lock.locked()))
    ...     await asyncio.sleep(1)
    ...     print(math.ceil(await shower_lock.locked()))
    ...     await shower_lock.extend()
    ...     print(math.ceil(await shower_lock.locked()))
    ...     await shower_lock.release()
    >>> asyncio.run(main(), debug=True)
    10
    9
    10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0