etr2460 commented on a change in pull request #9087: [logging] Add Auto Refresh 
Dashboard event into dashboard logging
URL: 
https://github.com/apache/incubator-superset/pull/9087#discussion_r375384004
 
 

 ##########
 File path: superset/assets/src/dashboard/actions/dashboardState.js
 ##########
 @@ -238,46 +236,12 @@ export function fetchCharts(chartList = [], force = 
false, interval = 0) {
     const delay = meta.stagger_refresh
       ? refreshTime / (chartList.length - 1)
       : 0;
-    chartList.forEach((chart, i) => {
-      setTimeout(
-        () => dispatch(refreshChart(chart, force, timeout)),
-        delay * i,
-      );
+    chartList.forEach((chartKey, i) => {
+      setTimeout(() => dispatch(refreshChart(chartKey, force)), delay * i);
     });
   };
 }
 
-let refreshTimer = null;
-export function startPeriodicRender(interval) {
-  const stopPeriodicRender = () => {
-    if (refreshTimer) {
-      clearTimeout(refreshTimer);
-      refreshTimer = null;
-    }
-  };
-
-  return (dispatch, getState) => {
-    stopPeriodicRender();
 
 Review comment:
   did we lose the code where we cancel the periodic render function? i didn't 
see it anywhere here (but might've missed it)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to