Update worker directive to use redis config

master
Garrett Mills 2 years ago
parent c36785c869
commit 64db07e9fa

@ -1,6 +1,6 @@
{
"name": "flitter-jobs",
"version": "0.4.1",
"version": "0.4.2",
"description": "A BullMQ service provider for Flitter.",
"main": "index.js",
"repository": "https://git.garrettmills.dev/flitter/jobs",

@ -67,6 +67,7 @@ class WorkerDirective extends Directive {
async handle(app, argv) {
const [ worker_name ] = argv
const config = this.config()
const redis_config = this.configs.get('redis')
const worker_config = config.workers[worker_name]
const queue_workers = {}
@ -90,7 +91,7 @@ class WorkerDirective extends Directive {
throw e
}
})
}, { connection: redis_config })
}
await new Promise(res => {

Loading…
Cancel
Save