mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
Eliminate TESTING_DEPLOYED.
(imported from commit 477d8b7a15f703df1e10ae5682e02fea5ce040e4)
This commit is contained in:
@@ -49,4 +49,4 @@ class ReturnTrue(logging.Filter):
|
||||
class RequireReallyDeployed(logging.Filter):
|
||||
def filter(self, record):
|
||||
from django.conf import settings
|
||||
return settings.DEPLOYED and not settings.TESTING_DEPLOYED
|
||||
return settings.DEPLOYED
|
||||
|
||||
@@ -11,7 +11,6 @@ config_file.read("/etc/zulip/zulip.conf")
|
||||
# and as such should not for example assume they are the main Zulip site.
|
||||
DEPLOYED = config_file.has_option('machine', 'deploy_type')
|
||||
STAGING_DEPLOYED = DEPLOYED and config_file.get('machine', 'deploy_type') == 'staging'
|
||||
TESTING_DEPLOYED = DEPLOYED and config_file.get('machine', 'deploy_type') == 'test'
|
||||
|
||||
ENTERPRISE = DEPLOYED and config_file.get('machine', 'deploy_type') == 'enterprise'
|
||||
|
||||
@@ -36,9 +35,7 @@ NOREPLY_EMAIL_ADDRESS = "noreply@zulip.com"
|
||||
|
||||
SESSION_SERIALIZER = "django.contrib.sessions.serializers.PickleSerializer"
|
||||
|
||||
if TESTING_DEPLOYED:
|
||||
EXTERNAL_HOST = platform.node()
|
||||
elif STAGING_DEPLOYED:
|
||||
if STAGING_DEPLOYED:
|
||||
EXTERNAL_HOST = 'staging.zulip.com'
|
||||
elif DEPLOYED:
|
||||
EXTERNAL_HOST = 'zulip.com'
|
||||
@@ -96,18 +93,13 @@ AUTHENTICATION_BACKENDS = ('zproject.backends.EmailAuthBackend',
|
||||
|
||||
# ALLOWED_HOSTS is used by django to determine which addresses
|
||||
# Zulip can serve. This is a security measure.
|
||||
if TESTING_DEPLOYED:
|
||||
# Allow any hosts for our test instances, to reduce 500 spam
|
||||
ALLOWED_HOSTS = ['*']
|
||||
else:
|
||||
# Deployed on zulip.com
|
||||
# The following are the zulip.com hosts
|
||||
ALLOWED_HOSTS = ['localhost', '.humbughq.com', '54.214.48.144', '54.213.44.54',
|
||||
'54.213.41.54', '54.213.44.58', '54.213.44.73',
|
||||
'54.200.19.65', '54.201.95.104', '54.201.95.206',
|
||||
'54.201.186.29', '54.200.111.22',
|
||||
'54.245.120.64', '54.213.44.83', '.zulip.com', '.zulip.net',
|
||||
'chat.dropboxer.net',
|
||||
]
|
||||
'chat.dropboxer.net']
|
||||
|
||||
|
||||
JWT_AUTH_KEYS = {}
|
||||
|
||||
@@ -28,7 +28,6 @@ DEPLOYED = config_file.has_option('machine', 'deploy_type')
|
||||
# Zulip run by Zulip, Inc. We will eventually be able to get rid of
|
||||
# them and just have the DEPLOYED flag, but we need them for now.
|
||||
STAGING_DEPLOYED = DEPLOYED and config_file.get('machine', 'deploy_type') == 'staging'
|
||||
TESTING_DEPLOYED = DEPLOYED and config_file.get('machine', 'deploy_type') == 'test'
|
||||
ENTERPRISE = DEPLOYED and config_file.get('machine', 'deploy_type') == 'enterprise'
|
||||
|
||||
secrets_file = ConfigParser.RawConfigParser()
|
||||
@@ -274,7 +273,7 @@ CACHES = {
|
||||
########################################################################
|
||||
|
||||
LOCAL_STATSD = (False)
|
||||
USING_STATSD = (DEPLOYED and not TESTING_DEPLOYED and not ENTERPRISE) or LOCAL_STATSD
|
||||
USING_STATSD = (DEPLOYED and not ENTERPRISE) or LOCAL_STATSD
|
||||
|
||||
# These must be named STATSD_PREFIX for the statsd module
|
||||
# to pick them up
|
||||
|
||||
Reference in New Issue
Block a user