villebro commented on code in PR #31844:
URL: https://github.com/apache/superset/pull/31844#discussion_r1924156311


##########
superset/config.py:
##########
@@ -689,17 +689,29 @@ class D3TimeFormat(TypedDict, total=False):
 # This is merely a default
 EXTRA_SEQUENTIAL_COLOR_SCHEMES: list[dict[str, Any]] = []
 
+# User used to execute cache warmup tasks
+# By default, the cache is warmed up using the primary owner. To fall back to 
using
+# a fixed user (admin in this example), use the following configuration:
+#
+# from superset.tasks.types import ExecutorType, FixedExecutor
+#
+# CACHE_WARMUP_EXECUTORS = [ExecutorType.OWNER, FixedExecutor("admin")]
+CACHE_WARMUP_EXECUTORS = [ExecutorType.OWNER]

Review Comment:
   @michael-s-molina I kinda like this idea. However, I'm not fully clear on 
what the exact pattern will look like for the forthcoming `AsyncTaskType`. 
Similarly, a while back when I was implementing a custom `KeyValue` resource 
for an internal use case, I ran into issues where it was difficult to extend 
the existing `KeyValueResource` type. In the end I ended up doing a bunch of 
funky casting to avoid linting issues. So to get around this, we would need to 
make sure the type (or its equivalent) supports introducing new types beyond 
the built-in ones.
   
   Thoughts? I'm ok implementing an `AsyncTaskType` enum (or similar) now, but 
we may still need to refactor it later, causing yet another breaking change.



-- 
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]

Reply via email to