Minor Adjustments
This commit is contained in:
parent
ba8e6ded26
commit
a90c28dd76
60 changed files with 8240 additions and 8 deletions
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue