-
-
Notifications
You must be signed in to change notification settings - Fork 57
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(init): uWSGI Snuba API processes not initializing Snuba #3370
fix(init): uWSGI Snuba API processes not initializing Snuba #3370
Conversation
@@ -29,8 +29,8 @@ def _load_entities() -> None: | |||
initialize_entity_factory() | |||
|
|||
|
|||
def initialize() -> None: | |||
logger.info("Initializing snuba") | |||
def initialize_snuba() -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple rename to make it easier to understand the usage of this function outside of this module.
from snuba.environment import setup_logging, setup_sentry | ||
|
||
setup_logging() | ||
setup_sentry() | ||
initialize_snuba() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the core change, the snuba/web/wsgi.py
file is loaded by uWSGI to start the API process.
setup_logging() | ||
setup_sentry() | ||
initialize_snuba() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to this ticket but I'm starting to think all of these should be in the initialize
function
Codecov ReportBase: 90.76% // Head: 91.33% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3370 +/- ##
==========================================
+ Coverage 90.76% 91.33% +0.56%
==========================================
Files 703 705 +2
Lines 32403 32541 +138
==========================================
+ Hits 29410 29720 +310
+ Misses 2993 2821 -172
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Overview
Before State
After State
Blast Radius
Testing Notes