Giter VIP home page Giter VIP logo

state-machine-semaphore's People

Contributors

dontirun avatar skrud-dt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

skrud-dt gmartim

state-machine-semaphore's Issues

Feature: Configurable wait

I would like to be able to configure the amount of time to wait between attempts to acquire the semaphore.

time: WaitTime.duration(Duration.seconds(3)),

Use Case

I recently used this with a distributed map state that called Amazon Bedrock. I needed to ensure that only one execution runs at a time. Each execution takes multiple minutes, so polling every three seconds is excessive. In that case, I would have liked to have it wait one minute.

Proposal

Add a prop named wait that takes a Duration and use that in waitToGetLock.

Cleanup locks when job fails

What happens when the job fails? Is there a mechanism in place to clean-up / release the lock? Like add a catch to the job that handles releasing the lock for example? In the article mentioned in the readme and event bridge rule is used to release the lock. This has the benefit of releasing the lock in the case of a timeout as well.

Do you think this should be added?

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.