Skip to content

Commit

Permalink
Bump fastify example
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Apr 5, 2023
1 parent 9a25f13 commit 82a0203
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 156 deletions.
7 changes: 1 addition & 6 deletions examples/with-fastify/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { FastifyAdapter } = require('@bull-board/fastify');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const { Queue: QueueMQ, Worker } = require('bullmq');
const fastify = require('fastify');

const sleep = (t) => new Promise((resolve) => setTimeout(resolve, t * 1000));
Expand All @@ -16,11 +16,6 @@ const redisOptions = {
const createQueueMQ = (name) => new QueueMQ(name, { connection: redisOptions });

async function setupBullMQProcessor(queueName) {
const queueScheduler = new QueueScheduler(queueName, {
connection: redisOptions,
});
await queueScheduler.waitUntilReady();

new Worker(
queueName,
async (job) => {
Expand Down
7 changes: 4 additions & 3 deletions examples/with-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"author": "felixmosh",
"license": "ISC",
"dependencies": {
"@bull-board/fastify": "^4.2.1",
"bullmq": "^1.81.1",
"fastify": "^4.10.2"
"@bull-board/fastify": "^5.0.0",
"@bull-board/api": "^5.0.0",
"bullmq": "^3.10.1",
"fastify": "^4.15.0"
}
}
Loading

0 comments on commit 82a0203

Please sign in to comment.