Updated Tables
This commit is contained in:
parent
1b650070d7
commit
7db1a3456b
13 changed files with 192 additions and 9 deletions
|
@ -1,9 +1,11 @@
|
|||
import { v4 } from "uuid";
|
||||
import applyJob from "./kubernetes.js";
|
||||
|
||||
export default class JobManager {
|
||||
constructor(clientMaxJobs) {
|
||||
this.clientMaxJobs = clientMaxJobs;
|
||||
const maxJobs = process.env.MAX_JOBS ? parseInt(process.env.MAX_JOBS) : 3;
|
||||
|
||||
class JobManager {
|
||||
constructor() {
|
||||
this.clientMaxJobs = maxJobs;
|
||||
this.clients = {};
|
||||
}
|
||||
|
||||
|
@ -53,3 +55,5 @@ export default class JobManager {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default new JobManager();
|
||||
|
|
|
@ -6,7 +6,7 @@ import { INFO, OK, logInfo } from "../util/logging.js";
|
|||
// Import Core Modules
|
||||
import expressApp from "./server.js";
|
||||
import applySockets from "../sockets/handler.js";
|
||||
import JobManager from "./JobManager.js";
|
||||
import jobManager from "./JobManager.js";
|
||||
import rabbiteer from "../rabbit/rabbit-workers.js";
|
||||
|
||||
// Constants
|
||||
|
@ -17,12 +17,12 @@ const port = process.env.QUALITEER_DEV_PORT ?? 52000;
|
|||
export default class Qualiteer {
|
||||
constructor(options = {}) {
|
||||
for (var k in options) this[k] = options[k];
|
||||
this.jobs = new JobManager(options.maxClientJobs ?? 3);
|
||||
this.jobs = jobManager;
|
||||
this.port = options.port ?? port;
|
||||
}
|
||||
|
||||
async _preinitialize() {
|
||||
logInfo(fig.textSync(title, "Cosmike"));
|
||||
logInfo(fig.textSync(title, "Cyberlarge"));
|
||||
INFO("INIT", "Initializing...");
|
||||
this.app = expressApp;
|
||||
this.server = http.createServer(this.app);
|
||||
|
|
|
@ -3,6 +3,10 @@ import express from "express";
|
|||
|
||||
// Routes
|
||||
import results from "../routes/results-route.js";
|
||||
import alerting from "../routes/alerting-route.js";
|
||||
import react from "../routes/react-route.js";
|
||||
import tests from "../routes/tests-route.js";
|
||||
import jobs from "../routes/jobs-route.js";
|
||||
|
||||
const app = express();
|
||||
app.all("/", (req, res) => res.redirect("/qualiteer"));
|
||||
|
@ -10,6 +14,10 @@ app.all("/", (req, res) => res.redirect("/qualiteer"));
|
|||
// Middlewares
|
||||
|
||||
// Routes
|
||||
app.use(react); // Static Build Route
|
||||
app.use("/api/results", results);
|
||||
app.use("/api/alerting", alerting);
|
||||
app.use("/api/tests", tests);
|
||||
app.use("/api/jobs", jobs);
|
||||
|
||||
export default app;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue