安装

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:

Text Only
@taskforcesh:registry=https://npm.taskforce.sh/
//npm.taskforce.sh/:_authToken=${NPM_TASKFORCESH_TOKEN}
always-auth=true

"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:

Text Only
yarn add @taskforcesh/bullmq-pro

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:

TypeScript
import { QueuePro, WorkerPro } from "@taskforcesh/bullmq-pro";

const queue = new QueuePro("myQueue");

const worker = new WorkerPro("myQueue", async (job) => {
  // Process job
});
回到页面顶部