Skip to content

Commit 429c30d

Browse files
committed
fix: Rename drain_timeout to shutdown_timeout
Fixes #29
1 parent e145147 commit 429c30d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
running in, e.g. ``"staging"`` or ``"production"``.
1010
- ``server_name`` (default to the system's hostname): The actual hostname of your
1111
system.
12-
- ``drain_timeout`` (default ``2.0``): When calling ``Client.close()`` or when
12+
- ``shutdown_timeout`` (default ``2.0``): When calling ``Client.close()`` or when
1313
exiting the contextmanager provided by ``sentry_sdk.init``, wait this many
1414
seconds for the last events to be sent.
1515
- ``integrations`` (default: ``[]``): Integrations to be enabled in addition to

sentry_sdk/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def capture_event(self, event, scope=None):
132132

133133
def drain_events(self, timeout=None):
134134
if timeout is None:
135-
timeout = self.options["drain_timeout"]
135+
timeout = self.options["shutdown_timeout"]
136136
if self._transport is not None:
137137
self._transport.drain_events(timeout)
138138

sentry_sdk/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"release": None,
99
"environment": None,
1010
"server_name": DEFAULT_SERVER_NAME,
11-
"drain_timeout": 2.0,
11+
"shutdown_timeout": 2.0,
1212
"integrations": [],
1313
"default_integrations": True,
1414
"repos": {},

tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def send_event(pool, event, auth):
7373
print(event["message"])
7474
7575
transport.send_event = send_event
76-
init("http://foobar@localhost/123", drain_timeout={num_messages})
76+
init("http://foobar@localhost/123", shutdown_timeout={num_messages})
7777
7878
for _ in range({num_messages}):
7979
capture_message("HI")

0 commit comments

Comments
 (0)