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

20 lines
512 B
JavaScript
Raw Normal View History

2016-06-18 21:53:18 +02:00
'use strict';
2016-10-26 10:43:11 +02:00
2016-06-18 21:53:18 +02:00
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
2016-07-02 11:54:50 +02:00
function load () {
2015-03-17 22:52:10 +01:00
FeatureToggleActions.init.triggerPromise();
StrategyActions.init.triggerPromise();
FeatureToggleActions.initArchive.triggerPromise();
}
2016-07-02 11:54:50 +02:00
module.exports = function (pollInterval) {
2016-06-18 21:53:18 +02:00
const intervall = pollInterval || 30;
2016-07-02 11:54:50 +02:00
_timer = new Timer(load, intervall * 1000);
2015-03-17 22:52:10 +01:00
_timer.start();
};