Skip to content

Commit

Permalink
fix: don't call bluebird.defer (#116)
Browse files Browse the repository at this point in the history
* fix: don't call bluebird.defer

* style: anon function
  • Loading branch information
james-owen authored Aug 17, 2022
1 parent 09259a4 commit d422dd5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/services/elastic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}),
Expand Down

0 comments on commit d422dd5

Please sign in to comment.