Skip to content

Commit 1804271

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 f63e46f commit 1804271

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
@@ -252,7 +252,7 @@ async def _wait_flush(self, timeout: float, callback: Optional[Any] = None) -> N
252252
pending = self._queue.qsize() + 1
253253
logger.error("flush timed out, dropped %s events", pending)
254254

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

0 commit comments

Comments
 (0)