Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "shutdown_timeout" typing #1256

Merged
merged 1 commit into from Nov 16, 2021
Merged

Conversation

seedofjoy
Copy link
Contributor

Fix "shutdown_timeout" parameter typing

Fix "shutdown_timeout" parameter typing
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

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.

None yet

2 participants