Hi all, does prisma client work within a bull queu...
# orm-help
c
Hi all, does prisma client work within a bull queue / worker process?
r
@Chris Packett 👋 I don’t think there should be any difference in the working in this case. You can simple use the client when processing items from the queue.
c
(node:22892) UnhandledPromiseRejectionWarning: ReferenceError: prismaClient is not defined
Here is the error I am getting @Ryan
r
I need more context. Is Prisma imported correctly? Where are you running your worker process, is it in the same app where your main process is running?
c
I think I got it
The problem was I was calling prismaClient in an array.forEach
which it didn’t like
But yes, Prisma was imported correctly, the worker process is running as a separate webpack entry point, and it is clustered with “throng” and using bull queues with ioredis.
And yes it is in the same app
r
The problem was I was calling prismaClient in an array.forEach
Still it shouldn’t be undefined if it was imported correctly. Let me try with a simple script by importing Prisma and using
forEach
.
👍 1