diff --git a/lib/services/elastic.js b/lib/services/elastic.js index 2e35b5c..b8451d4 100644 --- a/lib/services/elastic.js +++ b/lib/services/elastic.js @@ -9,7 +9,19 @@ const elastic = require('elasticsearch'), host: endpoint, maxSockets: 500, apiVersion: '6.x', - defer: /* istanbul ignore next */ () => bluebird.defer() + defer: () => { + let resolve, reject; + const promise = new Promise(() => { + resolve = arguments[0]; + reject = arguments[1]; + }); + + return { + resolve: resolve, + reject: reject, + promise: promise + }; + } }, FIXED_TYPE = '_doc'; var log = require('./log').setup({file: __filename}),