Skip to content

Commit 984069e

Browse files
committed
ref(worker): Make worker work with new ABC interface
Refactor the flush method in the async worker to use the async_flush coroutine. GH-4581
1 parent 94d387d commit 984069e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ async def _wait_flush(self, timeout: float, callback: Optional[Any] = None) -> N
236236
pending = self._queue.qsize() + 1
237237
logger.error("flush timed out, dropped %s events", pending)
238238

239-
async def flush(self, timeout: float, callback: Optional[Any] = None) -> None:
239+
async def flush_async(self, timeout: float, callback: Optional[Any] = None) -> None:
240240
logger.debug("background worker got flush request")
241241
if self.is_alive and timeout > 0.0:
242242
await self._wait_flush(timeout, callback)

0 commit comments

Comments
 (0)