Work with NextJS #2618
Unanswered
qlereboursBS
asked this question in
Q&A
Replies: 1 comment 1 reply
-
As stated in other issues and in the documentation, do not mix "done" callback and return promises in the processor function. Btw, you could also upgrade to BullMQ which only supports async processors to avoid this error happen in the future. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I know there was an issue with this subject, but mine seem to be different, so, I'm creating a discussion about making Bull working with NextJS's API.
Context
I was able to make it work once with this code:
First, it needs a specific webpack config in next.config.js to copy lua files:
Then, I created a file to POC the queue, in
src/app/api/translator/route.ts
, containing:And I ran a redis with
docker run -p 6379:6379 -it redis/redis-stack-server:latest
Issue
When I call the endpoint that add a job, it works only the first time:
Here are the logs produced:
I will test with something else than NextJS to see if it's a misconfiguration or if it's NextJS
Beta Was this translation helpful? Give feedback.
All reactions