1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/packages/unleash-frontend/public/js/stores/initalizer.js
2020-02-20 08:30:27 +01:00

19 lines
511 B
JavaScript

'use strict';
const FeatureToggleActions = require('./FeatureToggleActions');
const StrategyActions = require('./StrategyActions');
const Timer = require('../utils/Timer');
let _timer;
function load () {
FeatureToggleActions.init.triggerPromise();
StrategyActions.init.triggerPromise();
FeatureToggleActions.initArchive.triggerPromise();
}
module.exports = function (pollInterval) {
const intervall = pollInterval || 30;
_timer = new Timer(load, intervall * 1000);
_timer.start();
};