rename client creation module
This commit is contained in:
@@ -3,7 +3,6 @@ import elasticsearch from 'elasticsearch';
|
||||
export default function createClient(options) {
|
||||
let client;
|
||||
|
||||
// if there's a transport property, assume it's a client instance
|
||||
if (isClient(options)) {
|
||||
client = options;
|
||||
} else {
|
||||
@@ -14,5 +13,6 @@ export default function createClient(options) {
|
||||
};
|
||||
|
||||
export function isClient(client) {
|
||||
// if there's a transport property, assume it's a client instance
|
||||
return !!client.transport;
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import omit from 'lodash.omit';
|
||||
import Job from './job.js';
|
||||
import Worker from './worker.js';
|
||||
import constants from './constants';
|
||||
import createClient from './helpers/es_client';
|
||||
import createClient from './helpers/create_client';
|
||||
import indexTimestamp from './helpers/index_timestamp';
|
||||
import logger from './helpers/logger';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user