IO-117 PBS WIP
This commit is contained in:
@@ -17,7 +17,7 @@ const CdkCalculateAllocations =
|
||||
require("../cdk/cdk-calculate-allocations").default;
|
||||
const { isArray } = require("lodash");
|
||||
const logger = require("../utils/logger");
|
||||
const PbsExportJob = require("../accounting/pbs/pbs-job-export");
|
||||
const PbsExportJob = require("../accounting/pbs/pbs-job-export").default;
|
||||
|
||||
io.use(function (socket, next) {
|
||||
try {
|
||||
@@ -99,6 +99,17 @@ io.on("connection", (socket) => {
|
||||
//END CDK
|
||||
|
||||
//PBS
|
||||
socket.on("pbs-calculate-allocations", async (jobid, callback) => {
|
||||
const allocations = await CdkCalculateAllocations(socket, jobid);
|
||||
createLogEvent(socket, "DEBUG", `Allocations calculated.`);
|
||||
createLogEvent(
|
||||
socket,
|
||||
"TRACE",
|
||||
`Allocations calculated. ${JSON.stringify(allocations, null, 2)}`
|
||||
);
|
||||
|
||||
callback(allocations);
|
||||
});
|
||||
socket.on("pbs-export-job", (jobid) => {
|
||||
PbsExportJob(socket, jobid);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user