Minor Adjustments

This commit is contained in:
Dunemask 2023-03-19 13:53:37 -04:00 committed by dunemask
parent ba8e6ded26
commit a90c28dd76
60 changed files with 8240 additions and 8 deletions

View file

@ -34,6 +34,7 @@ export default class Qualiteer {
this.routes = buildRoutes(this.pg, this.sockets);
this.rabbiteer = buildRabbiteer(this.pg, this.sockets);
this.app.use(this.routes);
OK("INIT", "Initialized!");
}
async _connect() {

View file

@ -3,8 +3,8 @@ import evt from "../../common/sockets/events.js";
export const initiator = async (socket, jobs) => {
const jobStr = socket.handshake.query.job;
const jobReq = JSON.parse(jobStr);
if (!jobReq || !(jobReq instanceof Object))
if (!jobReq || !(jobReq instanceof Object))
throw Error("No 'job' was included in the handshake query");
const job = await jobs.newJob(jobReq, socket.id);

View file

@ -49,7 +49,6 @@ const applySockets = (server, jobs, options) => {
io.on("connection", (socket) => socketConnect(io, socket, jobs));
io.of("/").adapter.on("leave-room", (room, id) => socketDrop(io, room, id));
return io;
cle;
};
export default applySockets;