villebro commented on issue #14619:
URL: https://github.com/apache/superset/issues/14619#issuecomment-1922313136

   A simple change would be adding something like this:
   ```python
   GLOBAL_ASYNC_QUERIES_REDIS_CLASS = redis.Redis
   ```
   
   and then later use that, rather than the hardcoded class.
   
   However, IMO the more elegant solution would be make the backend 
configurable, similar to `RESULTS_BACKEND`. So something like this:
   
   ```python
   GLOBAL_ASYNC_QUERIES_BACKEND: BaseCache | None = None
   ```
   
   that could then be overridden locally:
   
   ```python
   GLOBAL_ASYNC_QUERIES_BACKEND = Sentinel(...)
   ```
   
   Both should be backwards compatible (in the second option we could just 
deprecate `GLOBAL_ASYNC_QUERIES_REDIS_CONFIG` and use it to instantiate `Redis` 
if the config is defined).


-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to