2020-09-10 16:00:21 +02:00
|
|
|
const triggers = require("./triggers")
|
2021-09-07 20:06:20 +02:00
|
|
|
const { processEvent } = require("./utils")
|
2020-10-07 18:56:47 +02:00
|
|
|
|
2020-09-11 19:47:22 +02:00
|
|
|
/**
|
|
|
|
* This module is built purely to kick off the worker farm and manage the inputs/outputs
|
|
|
|
*/
|
2021-09-07 20:06:20 +02:00
|
|
|
exports.init = async function () {
|
|
|
|
// don't wait this promise, it'll never end
|
2021-05-04 12:32:22 +02:00
|
|
|
triggers.automationQueue.process(async job => {
|
2021-09-07 20:06:20 +02:00
|
|
|
await processEvent(job)
|
2020-09-10 16:00:21 +02:00
|
|
|
})
|
|
|
|
}
|