Unverified Commit 66bf9147 authored by Paul Saunders's avatar Paul Saunders Committed by GitHub

fix: scheduled git sync task (#4481)

parent 1dc97424
...@@ -32,7 +32,7 @@ class Job { ...@@ -32,7 +32,7 @@ class Job {
if (this.immediate) { if (this.immediate) {
this.invoke(data) this.invoke(data)
} else { } else {
this.queue(data) this.enqueue(data)
} }
} }
...@@ -41,7 +41,7 @@ class Job { ...@@ -41,7 +41,7 @@ class Job {
* *
* @param {Object} data Job Data * @param {Object} data Job Data
*/ */
queue(data) { enqueue(data) {
this.timeout = setTimeout(this.invoke.bind(this), this.schedule.asMilliseconds(), data) this.timeout = setTimeout(this.invoke.bind(this), this.schedule.asMilliseconds(), data)
} }
...@@ -85,7 +85,7 @@ class Job { ...@@ -85,7 +85,7 @@ class Job {
WIKI.logger.warn(err) WIKI.logger.warn(err)
} }
if (this.repeat && this.queue.jobs.includes(this)) { if (this.repeat && this.queue.jobs.includes(this)) {
this.queue(data) this.enqueue(data)
} else { } else {
this.stop().catch(() => {}) this.stop().catch(() => {})
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment