BullMQ
Search…
Install
In order to install BullMQ Pro you need to use a NPM token from taskforce.sh.
With the token at hand just update or create a .npmrc file in your app repository with the following contents:
1
@taskforcesh:registry=https://npm.taskforce.sh/
2
//npm.taskforce.sh/:_authToken=${NPM_TASKFORCESH_TOKEN}
3
always-auth=true
Copied!
"NPM__TASKFORCESH__TOKEN" is an environment variable pointing to your token.
Then just install the @taskforcesh/bullmq-pro package as you would install any other package, with npm, yarn or pnpm:
1
yarn add @taskforcesh/bullmq-pro
Copied!
In order to use BullMQ Pro just import the Pro versions of the classes. These classes are subclasses of the open source BullMQ library with new functionality:
1
import { QueuePro, WorkerPro } from '@taskforcesh/bullmq-pro';
2
3
const queue = new QueuePro('myQueue');
4
5
const worker = new WorkerPro('myQueue', async job => {
6
// Process job
7
});
Copied!

Using Docker

If you use docker you must make sure that you also add the .npmrc file above in your Dockerfile:
1
WORKDIR /app
2
3
ADD .npmrc /app/.npmr
Copied!
Copy link
Contents
Using Docker