@grouparoo/core
Version:
The Grouparoo Core
22 lines (21 loc) • 727 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Notifier = void 0;
const actionhero_1 = require("actionhero");
const clsTask_1 = require("../../classes/tasks/clsTask");
class Notifier extends clsTask_1.CLSTask {
constructor() {
super(...arguments);
this.name = "notifier";
this.description = "run all notifiers";
this.frequency = 1000 * 60 * 60 * 6; // every 6 hours
this.queue = "system";
}
async runWithinTransaction() {
for (const i in actionhero_1.api.notifiers.notifiers) {
const notifier = actionhero_1.api.notifiers.notifiers[i];
await notifier.run();
}
}
}
exports.Notifier = Notifier;