Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for redis_family #250

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
- uses: actions/cache@v3
with:
path: ./node_modules
Expand All @@ -44,7 +44,7 @@ jobs:
eslint_extensions: ts
prettier: true
prettier_extensions: ts,json,js,yml
auto_fix: true
auto_fix: ${{ secrets.GH_TOKEN && true || false }}
commit_message: 'chore(lint): Fix code style issues with ${linter}'
github_token: ${{ secrets.GITHUB_TOKEN }}
git_email: '[email protected]'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ The following environment variables are supported:
| `REDIS_PORT` | x | `null` | Redis port |
| `REDIS_PASSWORD` | | `null` | Redis password |
| `REDIS_DB` | | `0` | Redis database index to use (see `options.db` from [docs](https://ioredis.readthedocs.io/en/latest/API/#new-redisport-host-options)) |
| `REDIS_FAMILY` | | `` | Redis connection family to use (see `options.family` from [docs](https://ioredis.readthedocs.io/en/latest/API/#new-redisport-host-options)) |
| `UI` | | `bull-board` | UI to use (supported: `arena`, `bull-board`) |
| `BULL_WATCH_QUEUE_PREFIXES` | | `bull` | Bull prefixes to monitor (globs like `prefix*` are supported) |
| `BULL_COLLECT_QUEUE_METRICS_INTERVAL_MS` | | `60000` | How often queue metrics are gathered |
Expand Down
4 changes: 4 additions & 0 deletions bull_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const config = cleanEnv(process.env, {
REDIS_PASSWORD: str({ default: '' }),
REDIS_PORT: port({ default: 6001 }),
CREATE_DELAY_MS: num({ default: 0 }),
REDIS_FAMILY: num<number | undefined>({ default: undefined }),
CONCURRENCY: num({ default: 1 }),
});

Expand All @@ -50,6 +51,7 @@ const main = async () => {
host: config.REDIS_HOST,
port: config.REDIS_PORT,
password: config.REDIS_PASSWORD,
family: config.REDIS_FAMILY,
},
});

Expand All @@ -59,6 +61,7 @@ const main = async () => {
host: config.REDIS_HOST,
port: config.REDIS_PORT,
password: config.REDIS_PASSWORD,
family: config.REDIS_FAMILY,
},
});

Expand Down Expand Up @@ -92,6 +95,7 @@ const main = async () => {
host: config.REDIS_HOST,
port: config.REDIS_PORT,
password: config.REDIS_PASSWORD,
family: config.REDIS_FAMILY,
},
limiter: {
duration: config.LIMITER_DURATION_MS,
Expand Down
4 changes: 2 additions & 2 deletions environments/local.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REDIS_PORT=6001
REDIS_PORT=6379
REDIS_HOST=127.0.0.1
LOG_LABEL=bull-monitor
LOG_LEVEL=debug
Expand All @@ -8,4 +8,4 @@ COLLECT_NODEJS_METRICS=false
BULL_WATCH_QUEUE_PREFIXES=bull
BULL_COLLECT_QUEUE_METRICS_INTERVAL_MS=5000
UI=bull-board
VERSION=local
VERSION=local
210 changes: 169 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"bull-arena": "^3.29.3",
"bull-master": "^1.0.5",
"bull-prom": "ejhayes/bull-prom#master",
"bullmq": "^1.86.2",
"bullmq": "^3.11.0",
"commander": "^9.3.0",
"envalid": "^7.3.1",
"forever-monitor": "^3.0.3",
Expand Down
Loading