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
|
|
|
|
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();
|
|
|
|
};
|