From 66bf914725e64e2bc2ac462c1e127affbf9ecd51 Mon Sep 17 00:00:00 2001 From: Paul Saunders Date: Sat, 25 Sep 2021 03:51:56 +0100 Subject: [PATCH] fix: scheduled git sync task (#4481) Signed-off-by: Paul Saunders Co-authored-by: Rainshaw --- server/core/scheduler.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/core/scheduler.js b/server/core/scheduler.js index 67fdde58..9eec70a7 100644 --- a/server/core/scheduler.js +++ b/server/core/scheduler.js @@ -32,7 +32,7 @@ class Job { if (this.immediate) { this.invoke(data) } else { - this.queue(data) + this.enqueue(data) } } @@ -41,7 +41,7 @@ class Job { * * @param {Object} data Job Data */ - queue(data) { + enqueue(data) { this.timeout = setTimeout(this.invoke.bind(this), this.schedule.asMilliseconds(), data) } @@ -85,7 +85,7 @@ class Job { WIKI.logger.warn(err) } if (this.repeat && this.queue.jobs.includes(this)) { - this.queue(data) + this.enqueue(data) } else { this.stop().catch(() => {}) }