Skip to content

Commit 57a344d

Browse files
committed
Fix CI script token refresh + cap retry wait time
1 parent 46221c0 commit 57a344d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/ci/aura_api_ci.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, json: dict[str, Any]) -> None:
1919
self.token_type = json["token_type"]
2020

2121
def is_expired(self) -> bool:
22-
return self.expires_at >= int(time.time())
22+
return self.expires_at <= int(time.time())
2323

2424
def __init__(self, client_id: str, client_secret: str, project_id: str | None = None) -> None:
2525
self._token: AuraApiCI.AuraAuthToken | None = None
@@ -93,6 +93,7 @@ def check_running(self, db_id: str) -> None:
9393
while should_retry:
9494
sleep(wait_time)
9595
wait_time *= 2
96+
wait_time = min(wait_time, 20)
9697

9798
response = requests.get(
9899
f"https://api-staging.neo4j.io/v1/instances/{db_id}",

0 commit comments

Comments
 (0)