Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
Bull queue not processing simple job

I'm completely new to Bull queue and I have a decent understanding of JavaScript. I am trying to get the following example to work:

const Queue = require('bull')

const myFirstQueue = new Queue('my-first-queue');

myFirstQueue.process(async (job, done) => {
  await doSomething(job.data);
  done();
});

const doSomething = data => {
  return new Promise((resolve, reject) => {
    return resolve(data);
  });
};

myFirstQueue.on('completed', (job, result) => {
  log.debug(`Job completed with result ${job}`);
});

(async function ad() {
  const job = await myFirstQueue.add({
  foo: 'bar',
});
})();

The error I'm getting is:

\node_modules\ioredis\built\redis\event_handler.js:177
self.flushQueue(new errors_1.MaxRetriesPerRequestError(maxRetriesPerRequest));
                ^
            

MaxRetriesPerRequestError: Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details.
    at Socket.<anonymous> (...\node_modules\ioredis\built\redis\event_handler.js:177:37)
    at Object.onceWrapper (node:events:652:26)
    at Socket.emit (node:events:537:28)
    at TCP.<anonymous> (node:net:747:14)

Based off the error I'm getting it seems like the queue cannot process this job at all and I'm not sure why I'm getting this error. I am running the script with the command node fileName.js in the correct directory. I can run other JavaScript files fine that are even more complex than this.

EDIT: Edited code to reflect changes from comments, still have the same error.

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!