Skip to content

ref: Use atexit only in init #45

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

Merged
merged 10 commits into from
Sep 1, 2018
Merged

ref: Use atexit only in init #45

merged 10 commits into from
Sep 1, 2018

Conversation

mitsuhiko
Copy link
Contributor

@mitsuhiko mitsuhiko commented Aug 31, 2018

This uses the same logic as the old raven python background worker which is to block in the atexit running thread on the lock the background worker has. This way the demon thread can be kept alive a while longer to orderly start the shutdown.

@mitsuhiko mitsuhiko requested a review from untitaker August 31, 2018 20:39
import socket


def default_shutdown_callback(pending, timeout):
Copy link
Member

@untitaker untitaker Sep 1, 2018

Choose a reason for hiding this comment

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

What is the usecase for making this function configurable?

@@ -523,9 +523,11 @@ def strip_string(value, assume_length=None, max_length=512):
return value[:max_length]


logger = logging.getLogger("sentry.errors")
logger = logging.getLogger("sentry_sdk.errors")
Copy link
Member

Choose a reason for hiding this comment

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

😬

@mitsuhiko
Copy link
Contributor Author

mitsuhiko commented Sep 1, 2018 via email

@mitsuhiko mitsuhiko merged commit fc6fc30 into master Sep 1, 2018
@untitaker untitaker deleted the feature/atexit branch September 1, 2018 16:12
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