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 */