Skip to content

Commit a0cdf95

Browse files
Test with sleep.
1 parent a4ca02e commit a0cdf95

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/charm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,6 +2402,7 @@ def _handle_postgresql_restart_need(self) -> None:
24022402
except Exception as e:
24032403
logger.error(f"Reload patroni call failed! error: {e!s}")
24042404

2405+
time.sleep(2) # Patroni need a bit to set flag on the API
24052406
restart_pending = self._patroni.is_restart_pending()
24062407
logger.debug(f"Checking if restart pending: {restart_postgresql} or {restart_pending}")
24072408
restart_postgresql = restart_postgresql or restart_pending

0 commit comments

Comments
 (0)