Skip to content

Commit e67f436

Browse files
author
Race Tester
committed
fix(client): return delete session retry result
1 parent 6b5b90e commit e67f436

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/hawk/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def delete_session(self, session_id: str) -> None:
232232
def _do() -> None:
233233
self._request("DELETE", f"/v1/sessions/{session_id}")
234234

235-
with_retry_sync(_do, self._retry_config)
235+
return with_retry_sync(_do, self._retry_config)
236236

237237
def list_messages(
238238
self, session_id: str, limit: int = 50, offset: int = 0
@@ -443,7 +443,7 @@ async def delete_session(self, session_id: str) -> None:
443443
async def _do() -> None:
444444
await self._request("DELETE", f"/v1/sessions/{session_id}")
445445

446-
await with_retry(_do, self._retry_config)
446+
return await with_retry(_do, self._retry_config)
447447

448448
async def list_messages(
449449
self, session_id: str, limit: int = 50, offset: int = 0

src/hawk/retry.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import asyncio
66
import random
7+
import time
78
from dataclasses import dataclass, field
89
from typing import TYPE_CHECKING, Callable, TypeVar
910

@@ -113,8 +114,6 @@ def with_retry_sync(
113114
Raises:
114115
The last exception if all retries are exhausted.
115116
"""
116-
import time
117-
118117
if config is None:
119118
config = DEFAULT_RETRY_CONFIG
120119

0 commit comments

Comments
 (0)