mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
settings: Derive RUNNING_INSIDE_TORNADO based on sys.argv.
This allows it to be used at application startup time.
This commit is contained in:
committed by
Tim Abbott
parent
8bb0768c4b
commit
169daa31a0
@@ -12,7 +12,6 @@ from typing_extensions import override
|
|||||||
|
|
||||||
from zerver.lib.management import ZulipBaseCommand
|
from zerver.lib.management import ZulipBaseCommand
|
||||||
|
|
||||||
settings.RUNNING_INSIDE_TORNADO = True
|
|
||||||
if settings.PRODUCTION:
|
if settings.PRODUCTION:
|
||||||
settings.SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
settings.SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||||
|
|
||||||
|
@@ -295,7 +295,9 @@ if not TORNADO_PORTS:
|
|||||||
TORNADO_PORTS = get_tornado_ports(config_file)
|
TORNADO_PORTS = get_tornado_ports(config_file)
|
||||||
TORNADO_PROCESSES = len(TORNADO_PORTS)
|
TORNADO_PROCESSES = len(TORNADO_PORTS)
|
||||||
|
|
||||||
RUNNING_INSIDE_TORNADO = False
|
RUNNING_INSIDE_TORNADO = (
|
||||||
|
len(sys.argv) > 1 and "manage.py" in sys.argv[0] and sys.argv[1] == "runtornado"
|
||||||
|
)
|
||||||
|
|
||||||
SILENCED_SYSTEM_CHECKS = [
|
SILENCED_SYSTEM_CHECKS = [
|
||||||
# auth.W004 checks that the UserProfile field named by USERNAME_FIELD has
|
# auth.W004 checks that the UserProfile field named by USERNAME_FIELD has
|
||||||
|
Reference in New Issue
Block a user