18F/federalist

View on GitHub
api/queues/SlackQueue.js

Summary

Maintainability
A
1 hr
Test Coverage
A
100%
const { Queue } = require('bullmq');

const SlackQueueName = 'slack';

class SlackQueue extends Queue {
  constructor(connection) {
    super(SlackQueueName, {
      connection,
      defaultJobOptions: {
        attempts: 5,
        backoff: {
          type: 'exponential',
          delay: 3000,
        },
      },
    });
  }
}

module.exports = {
  SlackQueue,
  SlackQueueName,
};