Browse Source

get # of retries from API config instead of ES client

pull/782/head
Stephen Hess 8 years ago
parent
commit
0121d3db2a
  1. 4
      controller/search.js

4
controller/search.js

@ -39,10 +39,10 @@ function setup( apiConfig, esclient, query ){
logger.debug( '[ES req]', cmd );
// options for retry
// maxRetries is from the ES client which defaults to 3
// maxRetries is from the API config with default of 3
// factor of 1 means that each retry attempt will esclient requestTimeout
const operationOptions = {
retries: _.get(esclient, 'transport.maxRetries'),
retries: _.get(apiConfig, 'requestRetries', 3),
factor: 1,
minTimeout: _.get(esclient, 'transport.requestTimeout')
};

Loading…
Cancel
Save