process is not happening #2343
Unanswered
afishler-zz
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I quickly tested with this code and it just works: const Queue = require ("bull");
const queue = new Queue("myQueue");
const main = async () => {
console.log("Main start");
await queue.add({ name: "John", age: 30 });
};
queue.process((job, done) => {
console.log(job.data);
done();
});
main().catch(console.error); |
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
-
Must be a totally silly issue but I am really a newbie. Process does not seem to happen at all. The debug message is not printed at all - only the "Main start". After that it just hangs.
After a while I get
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] {
code: 'ERR_UNHANDLED_REJECTION'
}
The code
Beta Was this translation helpful? Give feedback.
All reactions