From 778cc5cbd2791b2ca626c4d136588d31532a6402 Mon Sep 17 00:00:00 2001 From: LINGYE Date: Mon, 11 Mar 2019 23:19:43 +0800 Subject: [PATCH] support custom bull version --- lib/bull.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bull.js b/lib/bull.js index d76f006..38c9069 100644 --- a/lib/bull.js +++ b/lib/bull.js @@ -1,7 +1,6 @@ 'use strict'; const assert = require('assert'); -const Queue = require('bull'); module.exports = app => { app.addSingleton('bull', createQueue); @@ -15,6 +14,7 @@ function createQueue(config, app) { '[egg-bull] host and port of redis are required on config' ); + const Queue = app.config.bull.Bull || require('bull'); const queue = new Queue(name, config); /* istanbul ignore next */