Skip to content

Commit 777f3db

Browse files
committed
Merge branch 'srothh/transport-class-hierarchy' into srothh/worker-class-hierarchy
ref(transport): Add flush_async to Transport ABC
2 parents a6be4a3 + 5abf356 commit 777f3db

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

sentry_sdk/transport.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,19 @@ def flush(
107107
"""
108108
return None
109109

110+
async def flush_async(
111+
self: Self,
112+
timeout: float,
113+
callback: Optional[Any] = None,
114+
) -> None:
115+
"""
116+
Send out current events within `timeout` seconds. This method needs to be awaited for blocking behavior.
117+
118+
The default implementation is a no-op, since this method may only be relevant to some transports.
119+
Subclasses should override this method if necessary.
120+
"""
121+
return None
122+
110123
def kill(self: Self) -> None:
111124
"""
112125
Forcefully kills the transport.

0 commit comments

Comments
 (0)