Revamp Job flow

This commit is contained in:
Elijah Dunemask 2022-10-15 11:47:47 +00:00
parent 945afdfbbe
commit 4a0a4b29a5
86 changed files with 592 additions and 608 deletions

View file

@ -0,0 +1,22 @@
import Rabbiteer from "rabbiteer";
import buildWorkers from "./workers/index.js";
// Pull Environment Variables
const {
QUALITEER_RABBIT_HOST: host,
QUALITEER_RABBIT_USER: user,
QUALITEER_RABBIT_PASS: pass,
} = process.env;
// Rabbit Config
const rabbitConfig = {
protocol: "amqp:",
host: `amqp://${host}` ?? "localhost",
user: user ?? "guest",
pass: pass ?? "guest",
};
const buildRabbiteer = (pg, skio) =>
new Rabbiteer(null, buildWorkers(skio), { autoRabbit: rabbitConfig });
export default buildRabbiteer;