Giter VIP home page Giter VIP logo

redislock's People

Contributors

codingpains avatar danielstjules avatar manuelmhtr avatar marcbachmann avatar samzilverberg avatar sebgie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redislock's Issues

Auto extend lock

Hi, after reading documentation on npm package page, is there a way to auto extend timeout of lock, to prevent code executed outside the lock after expiring? Considering it may possible that some async work haven't finished. Thank you.

is project/maintainer still active?

hi there,

been a long time since there was any activity on this project.
has it been abandoned in favor of https://github.com/makeomatic/ioredis-lock?

if your'e still here let us know :)
i'm thinking of building semaphore functionality using the api you already implemented, would do it as a PR on this repo if its still active and not abandoned.
open to discussing it as well.

cheers!

retries: -1 === forever?

I'd love to see the ability to pass -1 as an option to retries to keep retrying forever.

In my use case I have several servers running a job scheduler, but I don't want all three scheduling duplicate jobs. But if one of the scheduler processes crashes (or the server goes down), I want another scheduler to acquire the lock and take over.

Compatibility with redis-py lock implementation

On first glance the implementation here seems to be the same as the lock implementation of redis-py, a very common python redis client implementation.
As debugging (and especially reproducing) lock errors can be very hard though, could someone with more insight (maybe @danielstjules?) confirm that this implementation is compatible with the way redis-py implements its locks?

https://github.com/andymccurdy/redis-py/blob/b940d073de4c13f8dfb08728965c6ac7c183c935/redis/lock.py

The Lua Scripts in both implementations basically do the same and the lock acquiring is the very same call.

should i keep use one lock instance in my project ?

Hello, man , I wanna to get suggested about which kind of strategy to pick when using RedisLock

  1. Keep one lock instance in my project , and Initialize the lock when the project setup
    2.Initialize the lock in function clause . so it will destroyed when function quit

Which one do you prefer?

SETNX example

hi!
thanks for helping.
just asking, i just need to create a new session id, like uuid. it says this is the simple use case, but i dont get it. what do i do with the lock? i just want to add a new unique id if it doesn't exist , how do i do it?

thanks so much!
ciao!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.