Skip to content

Commit a574fea

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 2b3014e commit a574fea

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

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

0 commit comments

Comments
 (0)