Skip to content

Commit

Permalink
Extend messages capacity and reduce expiry time
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Aranda committed Mar 4, 2021
1 parent 9898868 commit 80c000e
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions manager/manager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

# Define wether the system is being tested or not:
TESTING = os.environ.get("TESTING", False)
"""Define wether or not this instance is being created for testing or not, get from the `TESTING` environment variable (`string`)"""
"""Define wether or not this instance is being created for testing or not,
get from the `TESTING` environment variable (`string`)"""

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.getenv(
Expand Down Expand Up @@ -106,9 +107,7 @@
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [
os.path.join(BASE_DIR, "templates"),
],
"DIRS": [os.path.join(BASE_DIR, "templates")],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
Expand All @@ -135,20 +134,15 @@
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
]

# Password for other processes
PROCESS_CONNECTION_PASS = os.environ.get("PROCESS_CONNECTION_PASS", "dev_pass")
"""Password that Producers use to connect to eh Manager, read from the `PROCESS_CONNECTION_PASS` environment variable (`string`)"""
"""Password that Producers use to connect to eh Manager,
read from the `PROCESS_CONNECTION_PASS` environment variable (`string`)"""

# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/
Expand Down Expand Up @@ -227,16 +221,16 @@
+ "/0"
],
"symmetric_encryption_keys": [SECRET_KEY],
"capacity": 1500,
"expiry": 10,
},
},
}
"""Django Channels Channel Layer configuration (`dict`)"""

else:
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels.layers.InMemoryChannelLayer",
},
"default": {"BACKEND": "channels.layers.InMemoryChannelLayer"},
}

# LDAP
Expand All @@ -255,13 +249,12 @@
AUTH_LDAP_BIND_PASSWORD = ""

AUTH_LDAP_USER_SEARCH = LDAPSearch(
"ou=people,dc=planetexpress,dc=com",
ldap.SCOPE_SUBTREE,
"(uid=%(user)s)",
"ou=people,dc=planetexpress,dc=com", ldap.SCOPE_SUBTREE, "(uid=%(user)s)",
)

TRACE_TIMESTAMPS = True
"""Define wether or not to add tracing timestamps to websocket messages. Read from TRACE_TIMESTAMPS` environment variable (`bool`)"""
"""Define wether or not to add tracing timestamps to websocket messages.
Read from TRACE_TIMESTAMPS` environment variable (`bool`)"""

if os.environ.get("HIDE_TRACE_TIMESTAMPS", False):
TRACE_TIMESTAMPS = False

0 comments on commit 80c000e

Please sign in to comment.