Skip to content

Commit

Permalink
Merge pull request msavin#95 from macrozone/patch-1
Browse files Browse the repository at this point in the history
fix: temporary mongodb outages stop job-queue forever
  • Loading branch information
msavin authored Apr 29, 2021
2 parents 3db5623 + aa1363f commit 7250e1e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions package/server/imports/operator/queue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,18 @@ queue.prototype.trigger = function () {
var self = this;

if (self.available === true && self.interval) {
self.available = false;
try {
self.available = false;

if (dominator.isActive()) {
self.run()
} else {
if (dominator.isActive()) {
self.run()
} else {
self.available = true;
}
} catch(e) {
console.error(e);
self.available = true;
}
}
}
}

Expand Down Expand Up @@ -114,4 +119,4 @@ queue.prototype.run = function () {
}
}

export { queue }
export { queue }

0 comments on commit 7250e1e

Please sign in to comment.