pnpnpn / retry-decorator Goto Github PK
View Code? Open in Web Editor NEWDecorator for retrying when exceptions occur
License: MIT License
Decorator for retrying when exceptions occur
License: MIT License
The Chromium project (www.chromium.org) pulls in retry-decorator indirectly through the catapult (https://github.com/catapult-project/catapult/) and gsutil (https://github.com/GoogleCloudPlatform/gsutil) source repositories. In order for Chromium to be pulled into various Linux source distributions there's a requirement that all of the third party files pass the Linux licensecheck utility. Currently there are many files in the retry-decorator repository missing per-file licenses. From a current run of licensecheck, they are:
$ licensecheck -r . | grep "No copyright"
./setup.py: *No copyright* UNKNOWN
./retry_decorator/__init__.py: *No copyright* UNKNOWN
./retry_decorator/retry_decorator.py: *No copyright* UNKNOWN
We'd like to ask that per-file licenses be added to these files to make it easier to integrate retry-decorator not only into Chromium, but also Linux distributions in general. Thanks.
Is it possible to execute some code before retrying?
For example:
try:
return function(base_db, sql_string, sql_vars, debug_sql)
except (AttributeError, MySQLdb.OperationalError):
base_db.__init__()
return self.retry_db_errors(function(base_db, sql_string, sql_vars, debug_sql))
Could you please consider to add tests/ and CHANGES.txt into release?
Hi!
Could you add a setup.cfg
and enable the bdist universal option?
[bdist_wheel]
universal = 1
It would make installing the library via py2 and py3 easier.
And then upload this wheel to PyPI as a new version?
Could you please tag 1.1.0?
See https://github.com/pnpnpn/retry-decorator/blob/master/retry_decorator/retry_decorator.py#L34:
when callback_by_exception
is defined and in effect, then run_one_last_time
is defaulted to False
.
run_one_last_time
to begin with? To be able to swallow exceptions by the retry logic?In any case, run_one_last_time
should always default to True.
Is it possible to use this extension for multiple exceptions?
that parameter name should be replaced with "wait_secs" or "interval_secs" or something - it doesn't look like it's a timeout at all, but the interval between retries from what I can see.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.