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

execute some code before retrying #13

Open
vionemc opened this issue Dec 18, 2018 · 3 comments
Open

execute some code before retrying #13

vionemc opened this issue Dec 18, 2018 · 3 comments

Comments

@vionemc
Copy link

vionemc commented Dec 18, 2018

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))
@rjschwei
Copy link
Contributor

That would be a feature request, currently not possible.

@jheld
Copy link
Collaborator

jheld commented Mar 9, 2020

Interesting idea! Not sure if you still need the change, but probably wouldn't be too bad to implement.

@laur89
Copy link

laur89 commented Jun 9, 2021

Isn't this functionality already covered by callback_by_exception introduced by #5?

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

No branches or pull requests

4 participants