newPeriodicTask: function()

in src/com.jetbrains.youtrack.sdPlugin/app.js [54:64]


        newPeriodicTask: function (name, callback, delay, initialDelay = Math.floor(Math.random() * 1000)) {
            let tick = async () => {
                await callback();
                if (this.timerIdExists(timer)) {
                    setTimeout(tick, delay);
                }
            }
            let timer = setTimeout(tick, initialDelay);
            this.addTimer(name, timer);

        },