Updated things for compound testing

This commit is contained in:
Dunemask 2022-07-12 02:44:44 +00:00
parent 4e6732c09b
commit 5c3f865604
16 changed files with 160 additions and 56 deletions

View file

@ -7,7 +7,7 @@ import { INFO, OK, logInfo } from "../util/logging.js";
import expressApp from "./server.js";
import applySockets from "../sockets/handler.js";
import jobManager from "./JobManager.js";
import rabbiteer from "../rabbit/rabbit-workers.js";
import getRabbiteer from "../rabbit/rabbit-workers.js";
// Constants
const title = "QLTR";
@ -27,7 +27,8 @@ export default class Qualiteer {
this.app = expressApp;
this.server = http.createServer(this.app);
this.sockets = applySockets(this.server, this.jobs);
this.rabbiteer = rabbiteer;
this.app.set("socketio", this.sockets);
this.rabbiteer = getRabbiteer(this.sockets);
}
start() {

View file

@ -34,8 +34,8 @@ const pipelineMaxLife = (testName) => {
const buildCompound = (jobReq, socketId) => {
const { testName, command } = jobReq;
const pipelineLife = jobReq.pipelineLife ?? pipelineMaxLife(testName);
command.push(`pipelineLife=${pipelineLife}`);
const pipelineTriggers = jobReq.pipelineTriggers;
if (pipelineTriggers) command.push(`pipelineTriggers=${pipelineTriggers}`);
command.push(`pipelineDashboardSocket=${socketId}`);
return { ...jobReq, command };
};

View file

@ -14,7 +14,7 @@ const app = express();
// Special Routes
app.all("/", (req, res) => res.redirect("/qualiteer"));
if (process.env.MOCK_ROUTES === "true") app.use(mock);
if(process.env.USE_DEV_ROUTER === "true") app.use("/api/dev",dev);
if (process.env.USE_DEV_ROUTER === "true") app.use("/api/dev", dev);
// Middlewares