hughhhh commented on code in PR #29499:
URL: https://github.com/apache/superset/pull/29499#discussion_r1670692055
##########
docker/pythonpath_dev/superset_config.py:
##########
@@ -58,24 +59,41 @@
REDIS_PORT = os.getenv("REDIS_PORT", "6379")
REDIS_CELERY_DB = os.getenv("REDIS_CELERY_DB", "0")
REDIS_RESULTS_DB = os.getenv("REDIS_RESULTS_DB", "1")
+REDIS_PROTO = os.getenv("REDIS_PROTO", "redis")
+REDIS_USER = os.getenv("REDIS_USER", "")
+REDIS_PASSWORD = os.getenv("REDIS_PASSWORD", "")
+
+REDIS_BASE_URL = (
+ f"{REDIS_PROTO}://{REDIS_USER}:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}"
+ if REDIS_PASSWORD
+ else f"{REDIS_PROTO}://{REDIS_HOST}:{REDIS_PORT}"
+)
-RESULTS_BACKEND = FileSystemCache("/app/superset_home/sqllab")
+if os.getenv("RESULTS_BACKEND_CACHE_TYPE") == "RedisCache":
+ RESULTS_BACKEND = RedisCache(
+ key_prefix="superset_results",
+ ssl=REDIS_PROTO == "rediss",
+ password=REDIS_PASSWORD or None,
Review Comment:
nit: couldn't you just put `None` inside `.getenv` call as the default?
```
REDIS_PASSWORD = os.getenv("REDIS_PASSWORD", None)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]