From 7674959a9b4e3bec8eee583c506175b06adc0d42 Mon Sep 17 00:00:00 2001 From: jackwotherspoon Date: Wed, 24 Jul 2024 20:23:52 +0000 Subject: [PATCH] chore: explicitly pass in now --- google/cloud/alloydb/connector/instance.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/google/cloud/alloydb/connector/instance.py b/google/cloud/alloydb/connector/instance.py index 52adf8ab..1e723601 100644 --- a/google/cloud/alloydb/connector/instance.py +++ b/google/cloud/alloydb/connector/instance.py @@ -197,7 +197,9 @@ async def _refresh_operation(self, delay: int) -> ConnectionInfo: # if valid refresh, replace current with valid refresh result and schedule next refresh self._current = refresh_task # calculate refresh delay based on certificate expiration - delay = _seconds_until_refresh(refresh_result.expiration) + delay = _seconds_until_refresh( + refresh_result.expiration, datetime.now(timezone.utc) + ) logger.debug( f"['{self._instance_uri}']: Connection info refresh operation" " scheduled for "