Skip to content

Commit

Permalink
Update bull-board to 2.0.3 closes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Deadly0 committed May 10, 2021
1 parent d3434d2 commit 93f1581
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 303 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
end_of_line = crlf
insert_final_newline = true
charset = utf-8
indent_style = tab
indent_size = 4

[{package.json,**.yml}]
indent_style = space
indent_size = 2
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Docker image for [bull-board]. Allow you to monitor your bull queue without any coding!

Supports both: bull and bullmq. bull-board version v1.5.1
Supports both: bull and bullmq. bull-board version v2.0.3

### Quick start with Docker
```
Expand Down Expand Up @@ -69,7 +69,7 @@ services:
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: example-password
REDIS_USE_TLS: false
REDIS_USE_TLS: 'false'
BULL_PREFIX: bull
depends_on:
- redis
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "bullboard",
"version": "1.0.0-alpha.7",
"version": "2.0.3",
"main": "src/index.js",
"license": "MIT",
"dependencies": {
"body-parser": "^1.19.0",
"bull": "^3.13.0",
"bull-board": "^1.2.0",
"bull-board": "^2.0.3",
"bullmq": "^1.8.4",
"connect-ensure-login": "^0.1.1",
"express": "^4.17.1",
Expand Down
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const {router, setQueues, BullMQAdapter, BullAdapter} = require('bull-board');
const {createBullBoard} = require('bull-board');
const {BullAdapter} = require('bull-board/bullAdapter')
const {BullMQAdapter} = require('bull-board/bullMQAdapter')
const Queue = require('bull');
const bullmq = require('bullmq');
const express = require('express');
Expand All @@ -21,6 +23,7 @@ const redisConfig = {
};

const client = redis.createClient(redisConfig.redis);
const {router, setQueues} = createBullBoard([]);

client.KEYS(`${config.BULL_PREFIX}:*`, (err, keys) => {
const uniqKeys = new Set(keys.map(key => key.replace(/^.+?:(.+?):.+?$/, '$1')));
Expand All @@ -35,6 +38,7 @@ client.KEYS(`${config.BULL_PREFIX}:*`, (err, keys) => {
);

setQueues(queueList);
console.log('done!')
});

const app = express();
Expand All @@ -58,4 +62,5 @@ else {

app.listen(config.PORT, () => {
console.log(`bull-board is started http://localhost:${config.PORT}${config.HOME_PAGE}`);
console.log(`bull-board is fetching queue list, please wait...`);
});
Loading

0 comments on commit 93f1581

Please sign in to comment.