Reraise last error when getting DB connection

currently when there is a problem with configuration, the logging is
insufficient, especially when running panko-dbsync command.

Change-Id: I22ef74eb45f324fc6e374c4a3e03fbe9d7268eed
This commit is contained in:
Pavlo Shchelokovskyy 2018-08-02 14:19:22 +00:00
parent 7dcd1350ba
commit daa08ec939
1 changed files with 1 additions and 0 deletions

View File

@ -61,6 +61,7 @@ def get_connection_from_config(conf):
retries = conf.database.max_retries
@tenacity.retry(
reraise=True,
wait=tenacity.wait_fixed(conf.database.retry_interval),
stop=(tenacity.stop_after_attempt(retries) if retries >= 0
else tenacity.stop_never)