shelkesays commented on code in PR #40512:
URL: https://github.com/apache/superset/pull/40512#discussion_r3542662337


##########
superset/config.py:
##########
@@ -224,6 +224,20 @@ def _try_json_readsha(filepath: str, length: int) -> str | 
None:
 SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT = 0
 SUPERSET_DASHBOARD_PERIODICAL_REFRESH_WARNING_MESSAGE = None
 
+# Manual dashboard refresh can stagger chart data requests across this many
+# milliseconds so they do not all hit the backend at the same instant. This
+# defaults to 0, which preserves the original behavior where every chart
+# request fires at the same time when the user clicks the Refresh dashboard
+# button. Set a positive value to opt in to staggering; the frontend then
+# uses the larger of this value and the dashboard's stagger_time metadata,
+# which itself defaults to 5000 ms when it is not set explicitly. A dashboard
+# with stagger_refresh set to false in its metadata skips staggering on the
+# manual refresh path entirely, even when this value is positive.
+# If the backend does not provide this value at all (an older backend that
+# predates the key, or it is set to None), the frontend falls back to a
+# built-in default of 5000 ms.
+SUPERSET_DASHBOARD_MANUAL_REFRESH_STAGGER_MS = 0

Review Comment:
   Leaving this as-is for consistency. The neighboring dashboard and client 
config values are all plain literals without annotations (for example 
SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT, 
SUPERSET_DASHBOARD_POSITION_DATA_LIMIT, SUPERSET_CLIENT_RETRY_ATTEMPTS), so 
annotating only this one would make it the odd one out in its own section. mypy 
already infers int from the literal and passes clean on this file, so the 
annotation would not add any type-safety here. Happy to add it if a maintainer 
prefers the section be annotated more broadly.



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