name?: string,
transferList?: TransferListItem[]
) => Promise<ThreadWorkerResponse>
- listTaskFunctions: () => string[]
}
}
await pool.execute(data, name, transferList)
)
}
- if (!fastify.hasDecorator('listTaskFunctions')) {
- fastify.decorate('listTaskFunctions', (): string[] =>
- pool.listTaskFunctions()
- )
- }
done()
}
public constructor () {
super(FastifyWorker.startFastify, {
killHandler: async () => {
+ await FastifyWorker.fastify.pool.destroy()
await FastifyWorker.fastify.close()
}
})
name?: string,
transferList?: TransferListItem[]
) => Promise<WorkerResponse>
- listTaskFunctions: () => string[]
}
}
): Promise<WorkerResponse> => await pool.execute(data, name, transferList)
)
}
- if (!fastify.hasDecorator('listTaskFunctions')) {
- fastify.decorate('listTaskFunctions', (): string[] =>
- pool.listTaskFunctions()
- )
- }
- done()
}
export const fastifyPoolifier = fp(fastifyPoolifierPlugin, {
public constructor () {
super(WebSocketServerWorker.startWebSocketServer, {
killHandler: async () => {
- WebSocketServerWorker.wss.close()
await WebSocketServerWorker.requestHandlerPool.destroy()
+ WebSocketServerWorker.wss.close()
}
})
}