about summary refs log tree commit diff
path: root/uploader/default_settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/default_settings.py')
-rw-r--r--uploader/default_settings.py33
1 files changed, 27 insertions, 6 deletions
diff --git a/uploader/default_settings.py b/uploader/default_settings.py
index 26fe665..04e1c0a 100644
--- a/uploader/default_settings.py
+++ b/uploader/default_settings.py
@@ -3,21 +3,42 @@ The default configuration file. The values here should be overridden in the
 actual configuration file used for the production and staging systems.
 """
 
-import os
-
-LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING")
+LOG_LEVEL = "WARNING"
 SECRET_KEY = b"<Please! Please! Please! Change This!>"
-UPLOAD_FOLDER = "/tmp/qc_app_files"
+
+# Scratch directory and uploads:
+# *** The scratch directory ***
+# We avoid `/tmp` entirely for the scratch directory to avoid shared global
+# mutable state with other users/applications/processes.
+SCRATCH_DIRECTORY = "~/tmp/gn-uploader-scratchdir"
+UPLOADS_DIRECTORY = ""# If not set, will be under scratch directory.
+
 REDIS_URL = "redis://"
 JOBS_TTL_SECONDS = 1209600 # 14 days
-GNQC_REDIS_PREFIX="GNQC"
+GNQC_REDIS_PREFIX="gn-uploader"
 SQL_URI = ""
 
 GN2_SERVER_URL = "https://genenetwork.org/"
 
-SESSION_TYPE = "redis"
 SESSION_PERMANENT = True
 SESSION_USE_SIGNER = True
+SESSION_TYPE = "cachelib"
+## --- Settings for CacheLib session type --- ##
+## --- These are on flask-session config variables --- ##
+## --- https://cachelib.readthedocs.io/en/stable/file/ --- ##
+SESSION_FILESYSTEM_CACHE_PATH = "./flask_session"
+SESSION_FILESYSTEM_CACHE_THRESHOLD = 500
+SESSION_FILESYSTEM_CACHE_TIMEOUT = 300
+SESSION_FILESYSTEM_CACHE_MODE = 0o600
+SESSION_FILESYSTEM_CACHE_HASH_METHOD = None # default: hashlib.md5
+## --- END: Settings for CacheLib session type --- ##
 
 JWKS_ROTATION_AGE_DAYS = 7 # Days (from creation) to keep a JWK in use.
 JWKS_DELETION_AGE_DAYS = 14 # Days (from creation) to keep a JWK around before deleting it.
+
+
+## --- Feature flags ---
+FEATURE_FLAGS_HTTP: list[str] = []
+
+## --- Modules for which to log output ---
+LOGGABLE_MODULES: list[str] = []