shelkesays commented on code in PR #40512: URL: https://github.com/apache/superset/pull/40512#discussion_r3457305597
########## superset/config.py: ########## @@ -196,6 +196,14 @@ 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 staggers chart data requests across this many +# milliseconds so they do not all hit the backend at the same instant. The +# value behaves like the existing stagger_time dashboard metadata: the +# frontend uses the larger of this value and the dashboard's stagger_time. +# Set this to 0 to keep the older behavior where every chart request fires +# at the same time when the user clicks the Refresh dashboard button. +SUPERSET_DASHBOARD_MANUAL_REFRESH_STAGGER_MS = 5000 Review Comment: Good call — agreed, changing the default to `0` to preserve the existing behavior. I've made that change: - `SUPERSET_DASHBOARD_MANUAL_REFRESH_STAGGER_MS` now defaults to `0`, so the manual **Refresh dashboard** button fires every chart at once exactly as before. Staggering is opt-in: operators set a positive value to enable it. - The absent-key path is preserved: if the config key is removed entirely (treated as `null`, e.g. an older backend), the frontend still falls back to the built-in `5000` ms default. - Hardened the frontend read so a negative or non-finite value normalizes to `0` (off) rather than implicitly enabling staggering or producing a negative delay. - Updated the FAQ docs accordingly. Pushing shortly. -- 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]
