Reschuffle config slightly to ensure config_local is really processed at the end and fetch Bluesky creds from env (mainly for CI/CD purpose

This commit is contained in:
Oliver Falk
2025-02-03 15:48:16 +01:00
parent 433bf4d3e2
commit 22f9dac816

View File

@@ -268,9 +268,7 @@ TRUSTED_DEFAULT_URLS = [
}, },
] ]
# This MUST BE THE LAST! URL_TIMEOUT = 10
if os.path.isfile(os.path.join(BASE_DIR, "config_local.py")):
from config_local import * # noqa # flake8: noqa # NOQA # pragma: no cover
def map_legacy_config(trusted_url): def map_legacy_config(trusted_url):
@@ -287,4 +285,10 @@ def map_legacy_config(trusted_url):
# Backward compability for legacy behavior # Backward compability for legacy behavior
TRUSTED_DEFAULT_URLS = list(map(map_legacy_config, TRUSTED_DEFAULT_URLS)) TRUSTED_DEFAULT_URLS = list(map(map_legacy_config, TRUSTED_DEFAULT_URLS))
URL_TIMEOUT = 10 # Bluesky settings
BLUESKY_IDENTIFIER = os.environ.get("BLUESKY_IDENTIFIER", None)
BLUESKY_APP_PASSWORD = os.environ.get("BLUESKY_APP_PASSWORD", None)
# This MUST BE THE LAST!
if os.path.isfile(os.path.join(BASE_DIR, "config_local.py")):
from config_local import * # noqa # flake8: noqa # NOQA # pragma: no cover