import { receiveWeekNumber, fetchWeekNumber } from './weekNumber';
import {
  requestNewRelicErrors,
  receiveNewRelicErrors,
  fetchNewRelicErrors,
} from './newRelicErrors';
import {
  requestBugsHistory,
  receiveBugsHistory,
  fetchBugsHistory,
} from './bugsHistory';

export {
  receiveWeekNumber,
  fetchWeekNumber,
  requestNewRelicErrors,
  receiveNewRelicErrors,
  fetchNewRelicErrors,
  requestBugsHistory,
  receiveBugsHistory,
  fetchBugsHistory,
};

export const refreshAll = () => dispatch => {
  dispatch(fetchWeekNumber());
  dispatch(fetchNewRelicErrors());
  dispatch(fetchBugsHistory());
};

let refresher;
export const autoRefreshStart = () => dispatch => {
  refresher = setInterval(() => {
    dispatch(refreshAll());
  }, 1000 * 60); // TODO: magic number -> config
};

export const autoRefreshStop = () => {
  clearInterval(refresher);
};

@@ -754,40 +754,8 @@
 60);
- // TODO: magic number -%3E config
 %0A%7D;%0A

Add auto refresh start/stop actions