Skip to content

Fix "shutdown_timeout" typing#1256

Merged
AbhiPrasad merged 1 commit into
getsentry:masterfrom
seedofjoy:patch-1
Nov 16, 2021
Merged

Fix "shutdown_timeout" typing#1256
AbhiPrasad merged 1 commit into
getsentry:masterfrom
seedofjoy:patch-1

Conversation

@seedofjoy

Copy link
Copy Markdown
Contributor

Fix "shutdown_timeout" parameter typing

Fix "shutdown_timeout" parameter typing

@AbhiPrasad AbhiPrasad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup it seems like shutdown can be a float, thank you for your contribution!

timeout=None, # type: Optional[float]
callback=None, # type: Optional[Callable[[int, float], None]]
):
# type: (...) -> None
"""
Wait for the current events to be sent.
:param timeout: Wait for at most `timeout` seconds. If no `timeout` is provided, the `shutdown_timeout` option value is used.
:param callback: Is invoked with the number of pending events and the configured timeout.
"""
if self.transport is not None:
if timeout is None:
timeout = self.options["shutdown_timeout"]
self.session_flusher.flush()
self.transport.flush(timeout=timeout, callback=callback)

@AbhiPrasad
AbhiPrasad merged commit 40a309a into getsentry:master Nov 16, 2021
@seedofjoy
seedofjoy deleted the patch-1 branch November 17, 2021 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants