diff --git a/package/server/imports/operator/queue/index.js b/package/server/imports/operator/queue/index.js index 50c65ef..8eaf70a 100755 --- a/package/server/imports/operator/queue/index.js +++ b/package/server/imports/operator/queue/index.js @@ -49,11 +49,17 @@ 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); + } finally { self.available = true; } } @@ -114,4 +120,4 @@ queue.prototype.run = function () { } } -export { queue } \ No newline at end of file +export { queue }