()
| 27 | export const socketIo = singleton("socketIo", initalizeIoServer); |
| 28 | |
| 29 | function initalizeIoServer() { |
| 30 | const io = initializeSocketIOServerInstance(); |
| 31 | |
| 32 | io.on("connection", (socket) => { |
| 33 | logger.log(`[socket.io][${socket.id}] connection at url: ${socket.request.url}`); |
| 34 | }); |
| 35 | |
| 36 | const coordinatorNamespace = createCoordinatorNamespace(io); |
| 37 | const providerNamespace = createProviderNamespace(io); |
| 38 | const sharedQueueConsumerNamespace = createSharedQueueConsumerNamespace(io); |
| 39 | |
| 40 | return { |
| 41 | io, |
| 42 | coordinatorNamespace, |
| 43 | providerNamespace, |
| 44 | sharedQueueConsumerNamespace, |
| 45 | }; |
| 46 | } |
| 47 | |
| 48 | function initializeSocketIOServerInstance() { |
| 49 | if (env.REDIS_HOST && env.REDIS_PORT) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…