Skip to content

Commit 59efc4f

Browse files
wustzdyCaralHsi
andauthored
optimize (#717)
Co-authored-by: CaralHsi <[email protected]>
1 parent b999ff3 commit 59efc4f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/memos/graph_dbs/polardb.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def _get_connection(self):
252252
if attempt < max_retries - 1:
253253
# Exponential backoff: 0.1s, 0.2s, 0.4s
254254
"""time.sleep(0.1 * (2**attempt))"""
255-
time.sleep(0.01)
255+
time.sleep(0.003)
256256
continue
257257
else:
258258
raise RuntimeError("Pool returned a closed connection after all retries")
@@ -284,7 +284,7 @@ def _get_connection(self):
284284
if attempt < max_retries - 1:
285285
# Exponential backoff: 0.1s, 0.2s, 0.4s
286286
"""time.sleep(0.1 * (2**attempt))"""
287-
time.sleep(0.01)
287+
time.sleep(0.003)
288288
continue
289289
else:
290290
raise RuntimeError(
@@ -317,7 +317,7 @@ def _get_connection(self):
317317
wait_time = 0.5 * (2**attempt)
318318
logger.info(f"[_get_connection] Waiting {wait_time}s before retry...")
319319
"""time.sleep(wait_time)"""
320-
time.sleep(0.01)
320+
time.sleep(0.003)
321321
continue
322322
else:
323323
raise RuntimeError(
@@ -329,7 +329,7 @@ def _get_connection(self):
329329
# Other pool errors - retry with normal backoff
330330
if attempt < max_retries - 1:
331331
"""time.sleep(0.1 * (2**attempt))"""
332-
time.sleep(0.01)
332+
time.sleep(0.003)
333333
continue
334334
else:
335335
raise RuntimeError(
@@ -356,7 +356,7 @@ def _get_connection(self):
356356
else:
357357
# Exponential backoff: 0.1s, 0.2s, 0.4s
358358
"""time.sleep(0.1 * (2**attempt))"""
359-
time.sleep(0.01)
359+
time.sleep(0.003)
360360
continue
361361

362362
# Should never reach here, but just in case

0 commit comments

Comments
 (0)