From 80c000e1b2984d3617785ecdefdf3caafd4c4e71 Mon Sep 17 00:00:00 2001 From: Sebastian Aranda Date: Thu, 4 Mar 2021 19:16:17 -0300 Subject: [PATCH] Extend messages capacity and reduce expiry time --- manager/manager/settings.py | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/manager/manager/settings.py b/manager/manager/settings.py index fe64402b..59aa35de 100644 --- a/manager/manager/settings.py +++ b/manager/manager/settings.py @@ -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( @@ -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": [ @@ -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/ @@ -227,6 +221,8 @@ + "/0" ], "symmetric_encryption_keys": [SECRET_KEY], + "capacity": 1500, + "expiry": 10, }, }, } @@ -234,9 +230,7 @@ else: CHANNEL_LAYERS = { - "default": { - "BACKEND": "channels.layers.InMemoryChannelLayer", - }, + "default": {"BACKEND": "channels.layers.InMemoryChannelLayer"}, } # LDAP @@ -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