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

Context manager should not suppress exceptions #426

Open
nazarewk opened this issue Jun 18, 2019 · 4 comments
Open

Context manager should not suppress exceptions #426

nazarewk opened this issue Jun 18, 2019 · 4 comments

Comments

@nazarewk
Copy link

Description

def __exit__(self, exc_type, exc_value, traceback):
"""
Releases the lock - with best_effort=True
"""
logger.debug('Exiting: %s', self.unique_identifier)
self.release(best_effort=True)
return True

I don't think context manager should suppress exceptions, makes for very annoying debugging experience and error handling.

@benjackwhite
Copy link

Looks like #285 actually is a nice solution to this exact issue. I get the feeling this project isn't being maintained... @mohankishore any thoughts on how you might want support with regards to maintain this package?

@danrue
Copy link

danrue commented Mar 24, 2020

@nazarewk @benjackwhite I'm looking to use python_dynamodb_lock but it appears unmaintained. Are you using it in production or have you found something better?

@yelizariev
Copy link

There is a fork with the applied fix

You can install it with following command

    pip install git+https://github.com/whatnick/python_dynamodb_lock.git

See also #819

@whatnick
Copy link

whatnick commented Jul 14, 2020

This fork now has a pypi package : https://pypi.org/project/python-dynamodb-lock-whatnick/ . More coming soon. I will fix up the CI pipeline and tag the source repo properly. During the Github downtime period yesterday my own CI pipeline failed to install from Github and I pushed from my local clone to PyPI to resuscitate my pipeline. I will do this properly soon. I am actively using this in my production deployment for Nairobi Rain Radar.

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

No branches or pull requests

5 participants