Mass replace parameter order (socket,io)>(io,socket), worked on queueing system

This commit is contained in:
2024-09-21 23:54:52 +02:00
parent 10dc9df8a9
commit 9d6de8a1a9
36 changed files with 206 additions and 121 deletions

View File

@ -0,0 +1,16 @@
import { TSocket } from '../utilities/types'
import { Server as SocketServer } from 'socket.io'
export default class SomeJob {
constructor(private params: any) {}
async execute(io: SocketServer, socket?: TSocket) {
// Handle the event
console.log('Event params:', this.params)
if (socket) {
socket.emit('notification', { message: 'Something happened with socket' })
}
// Use io for broadcasting if needed
io.emit('notification', { message: 'Something happened' })
}
}