Revamp Job flow
This commit is contained in:
parent
945afdfbbe
commit
4a0a4b29a5
86 changed files with 592 additions and 608 deletions
22
lib/server/rabbit/rabbit-workers.js
Normal file
22
lib/server/rabbit/rabbit-workers.js
Normal 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;
|
Loading…
Add table
Add a link
Reference in a new issue