summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-08-20 13:10:40 +0000
committerGerrit Code Review <review@openstack.org>2018-08-20 13:10:40 +0000
commitc1d86ff1293869d838f94207d833b85e8dbc2022 (patch)
tree1326a836ecdfd8234e0c815a6d19bd822018297a
parent39eb798e72ba00025a1347c2baa2e9e60f19011f (diff)
parentdaa08ec93952d46029862ed7d3e53df09e70f890 (diff)
Merge "Reraise last error when getting DB connection"
-rw-r--r--panko/storage/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/panko/storage/__init__.py b/panko/storage/__init__.py
index 4cbeaf1..b421979 100644
--- a/panko/storage/__init__.py
+++ b/panko/storage/__init__.py
@@ -61,6 +61,7 @@ def get_connection_from_config(conf):
61 retries = conf.database.max_retries 61 retries = conf.database.max_retries
62 62
63 @tenacity.retry( 63 @tenacity.retry(
64 reraise=True,
64 wait=tenacity.wait_fixed(conf.database.retry_interval), 65 wait=tenacity.wait_fixed(conf.database.retry_interval),
65 stop=(tenacity.stop_after_attempt(retries) if retries >= 0 66 stop=(tenacity.stop_after_attempt(retries) if retries >= 0
66 else tenacity.stop_never) 67 else tenacity.stop_never)