1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00
unleash.unleash/packages/unleash-frontend/public/js/stores/initalizer.js

19 lines
507 B
JavaScript
Raw Normal View History

2016-06-18 21:53:18 +02:00
'use strict';
const FeatureToggleActions = require('./FeatureToggleActions');
const StrategyActions = require('./StrategyActions');
const Timer = require('../utils/Timer');
2015-03-17 22:52:10 +01:00
2016-06-18 21:53:18 +02:00
let _timer;
2015-03-17 22:52:10 +01:00
function load() {
FeatureToggleActions.init.triggerPromise();
StrategyActions.init.triggerPromise();
FeatureToggleActions.initArchive.triggerPromise();
}
module.exports = function(pollInterval) {
2016-06-18 21:53:18 +02:00
const intervall = pollInterval || 30;
2015-03-17 22:52:10 +01:00
_timer = new Timer(load, intervall*1000);
_timer.start();
};