bito-code-review[bot] commented on code in PR #40512:
URL: https://github.com/apache/superset/pull/40512#discussion_r3339562605


##########
docs/docs/faq.mdx:
##########
@@ -181,6 +181,17 @@ value in milliseconds in the JSON Metadata field:
 Here, the entire dashboard will refresh at once if periodic refresh is on. The 
stagger time of 2.5
 seconds is ignored.
 
+The manual **Refresh dashboard** button also staggers its chart requests. The 
window is controlled
+by the `SUPERSET_DASHBOARD_MANUAL_REFRESH_STAGGER_MS` server config in 
`superset_config.py`. The
+default is `5000` milliseconds, which matches the fallback used for timed 
refresh. A per-dashboard
+`stagger_time` metadata value still wins when it is larger. Set the server 
config to `0` to keep
+the older behavior where every chart request fires at the same time:

Review Comment:
   <!-- Bito Reply -->
   The current documentation is accurate. When 
`SUPERSET_DASHBOARD_MANUAL_REFRESH_STAGGER_MS` is set to `0`, the `interval` 
argument passed to `fetchCharts` is `0`, triggering the early return at 
`dashboardState.ts:748`. This means the `Math.max(interval, stagger_time || 
5000)` calculation is never reached, and `stagger_time` is not consulted. 
Therefore, the older behavior where every chart request fires at the same time 
is indeed preserved when the server config is `0`, as the documentation states.
   
   **superset-frontend/src/dashboard/actions/dashboardState.ts**
   ```
   if (!interval) {
     return Promise.all(
       chartList.map(chartKey =>
         Promise.resolve(dispatch(refreshChart(chartKey, force, dashboardId))),
       ),
     ).then(() => undefined);
   }
   ```



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