-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
ref: switch from mywsgi/uwsgi to pyuwsgi #3076
Conversation
056a5ed
to
365f19c
Compare
Codecov Report
@@ Coverage Diff @@
## master #3076 +/- ##
==========================================
+ Coverage 92.53% 92.72% +0.19%
==========================================
Files 655 656 +1
Lines 30353 30379 +26
==========================================
+ Hits 28087 28170 +83
+ Misses 2266 2209 -57
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
options: dict[str, bool | int | str | None] = { | ||
"auto_procname": True, | ||
"chmod_socket": 777, | ||
"die_on_term": True, | ||
"disable_write_exception": True, | ||
"enable_threads": True, | ||
"ignore_sigpipe": True, | ||
"ignore_write_errors": True, | ||
"lazy_apps": True, | ||
"log_format": '%(addr) - %(user) [%(ltime)] "%(method) %(uri) %(proto)" %(status) %(size) "%(referer)" "%(uagent)"', | ||
"log_x_forwarded_for": True, | ||
"master": True, | ||
"module": module, | ||
"need_app": True, | ||
"processes": 1, | ||
"protocol": protocol, | ||
"single_interpreter": True, | ||
"threads": 1, | ||
"thunder_lock": True, | ||
"vacuum": True, | ||
"virtualenv": sys.prefix, | ||
"wsgi_env_behavior": "holy", | ||
f"{protocol}_socket": bind, | ||
**kwargs, | ||
} |
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.
these are copied from mywsgi
which appear to be copied from sentry
not planning to merge or roll this out until after |
@@ -46,13 +47,11 @@ def api( | |||
WSGIRequestHandler.protocol_version = "HTTP/1.1" | |||
application.run(host=host, port=port, threaded=True, debug=debug) | |||
else: | |||
import mywsgi | |||
|
|||
if log_level: | |||
os.environ["LOG_LEVEL"] = log_level | |||
|
|||
with flush_attribution_producer(): |
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.
unrelated to this patch but this call does nothing! both myuwsgi.run
and snuba.utils.uwsgi.run
end with os.execvp
which replaces the current process
pyuwsgi provides wheels making it much faster to install whereas uwsgi isn't wheelable
365f19c
to
4c860c4
Compare
pyuwsgi provides wheels making it much faster to install whereas uwsgi isn't wheelable
this also cuts about 10 minutes from the uncached arm64 image build (17 minutes -> 7 minutes)