8000 fix: Add global flush() · etherscan-io/sentry-python@bbafe17 · GitHub
[go: up one dir, main page]

Skip to content

Commit bbafe17

Browse files
committed
fix: Add global flush()
1 parent 1c41dfb commit bbafe17

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sentry_sdk/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ def inner():
8282
return inner()
8383

8484

85+
@hubmethod
86+
def flush(timeout=None, callback=None):
87+
hub = Hub.current
88+
if hub is not None and hub.client is not None:
89+
return hub.client.flush(timeout=timeout, callback=callback)
90+
91+
8592
@hubmethod
8693
def last_event_id():
8794
hub = Hub.current

0 commit comments

Comments
 (0)
0