import * as trpcNext from "@trpc/server/adapters/next";
import { appRouter } from "@queuedash/api";
import Bull from "bull";
import { Queue } from "bullmq";
export default trpcNext.createNextApiHandler({
router: appRouter,
onError({ error }) {
if (error.code === "INTERNAL_SERVER_ERROR") {
// send to bug reporting
console.error("Something went wrong", error);
}
},
batching: {
enabled: true,
},
createContext: () => ({
queues: [
{
// queue: new Bull("sbt_airdrop", {
// redis: {
// host: "localhost",
// port: 6379,
// }
// }),
queue: new Queue("sbt_airdrop", {
connection: {
host: "localhost",
port: 6379,
},
}),
displayName: "SBT Airdrop",
type: "bull" as const,
},
],
}),
});
Something went wrong xe [TRPCError]: n.queue.client.info is not a function
at /Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:41:4620
at d (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1757)
at Object.next (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1040)
at c (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:619)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'INTERNAL_SERVER_ERROR',
[cause]: undefined
}
Something went wrong xe [TRPCError]: n.queue.client.info is not a function
at /Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:41:4620
at d (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1757)
at Object.next (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1040)
at c (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:619)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'INTERNAL_SERVER_ERROR',
[cause]: undefined
}
Something went wrong xe [TRPCError]: n.queue.client.info is not a function
at /Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:41:4620
at d (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1757)
at Object.next (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1040)
at c (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:619)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'INTERNAL_SERVER_ERROR',
[cause]: undefined
}
Something went wrong xe [TRPCError]: n.queue.client.info is not a function
at /Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:41:4620
at d (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1757)
at Object.next (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1040)
at c (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:619)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'INTERNAL_SERVER_ERROR',
[cause]: undefined
}
Something went wrong xe [TRPCError]: n.queue.client.info is not a function
at /Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:41:4620
at d (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1757)
at Object.next (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1040)
at c (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:619)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'INTERNAL_SERVER_ERROR',
[cause]: undefined
}
Something went wrong xe [TRPCError]: n.queue.client.info is not a function
at /Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:41:4620
at d (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1757)
at Object.next (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1040)
at c (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:619)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'INTERNAL_SERVER_ERROR',
[cause]: undefined
}
Something went wrong xe [TRPCError]: n.queue.client.info is not a function
at /Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:41:4620
at d (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1757)
at Object.next (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:1040)
at c (/Users/liho/Desktop/queuedash/examples/with-next/node_modules/@queuedash/api/dist/main.js:1:619)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'INTERNAL_SERVER_ERROR',
[cause]: undefined
}