MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / initalizeIoServer

Function initalizeIoServer

apps/webapp/app/v3/handleSocketIo.server.ts:29–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27export const socketIo = singleton("socketIo", initalizeIoServer);
28
29function 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
48function initializeSocketIOServerInstance() {
49 if (env.REDIS_HOST && env.REDIS_PORT) {

Callers

nothing calls this directly

Calls 6

createProviderNamespaceFunction · 0.85
onMethod · 0.65
logMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…