Browse Source

fix: scheduled git sync task (#4481)

Signed-off-by: Paul Saunders <paul.saunders@finbourne.com>

Co-authored-by: Rainshaw <rxg@live.com>
pull/4490/head
Paul Saunders 3 years ago
committed by GitHub
parent
commit
66bf914725
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions
  1. 6
      server/core/scheduler.js

6
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(() => {})
}

Loading…
Cancel
Save