aws-v3-sdk 1.0.31 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,10 @@ const { NodeHttpHandler } = require('@aws-sdk/node-http-handler')
6
6
 
7
7
  const ddb = new DynamoDBClient({
8
8
  requestHandler: new NodeHttpHandler({
9
- httpsAgent: new Agent({ keepAlive: false })
9
+ httpsAgent: new Agent({
10
+ keepAlive: false,
11
+ maxSockets: 50
12
+ })
10
13
  })
11
14
  })
12
15
 
package/clients/lambda.js CHANGED
@@ -5,7 +5,10 @@ const { Agent } = require('https')
5
5
  const { NodeHttpHandler } = require('@aws-sdk/node-http-handler')
6
6
 
7
7
  const keepAliveOptions = new NodeHttpHandler({
8
- httpsAgent: new Agent({ keepAlive: false })
8
+ httpsAgent: new Agent({
9
+ keepAlive: false,
10
+ maxSockets: 50
11
+ })
9
12
  })
10
13
 
11
14
  class Lambda {
@@ -48,7 +48,7 @@ exports.sendAuditsReqToES = async (method, index, type, id, data) => {
48
48
  index,
49
49
  type,
50
50
  body: data,
51
- refresh: false
51
+ refresh: true
52
52
 
53
53
  })
54
54
  return response.body
@@ -28,8 +28,7 @@ const getClient = async () => {
28
28
  const cred = createAwsConnector(credentials, REGION)
29
29
  return new Client({
30
30
  ...cred,
31
- node: host,
32
- maxRetries: 0
31
+ node: host
33
32
  })
34
33
  }
35
34
 
@@ -40,8 +39,7 @@ exports.sendReqToES = async (method, index, type, id, data) => {
40
39
  const response = await client.delete({
41
40
  index,
42
41
  type,
43
- id,
44
- refresh: false
42
+ id
45
43
  })
46
44
  return response.body
47
45
  } else if (method === 'UPDATE') {
@@ -50,17 +48,7 @@ exports.sendReqToES = async (method, index, type, id, data) => {
50
48
  index,
51
49
  type,
52
50
  body: data,
53
- refresh: false,
54
- retry_on_conflict: 10
55
- })
56
- return response.body
57
- } else if (method === 'UPDATE_BY_QUERY') {
58
- const response = await client.updateByQuery({
59
- index,
60
- type,
61
- body: data,
62
- refresh: false,
63
- retry_on_conflict: 10
51
+ refresh: true
64
52
  })
65
53
  return response.body
66
54
  } else {
@@ -69,7 +57,7 @@ exports.sendReqToES = async (method, index, type, id, data) => {
69
57
  index,
70
58
  type,
71
59
  body: data,
72
- refresh: false
60
+ refresh: true
73
61
  })
74
62
  return response.body
75
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-v3-sdk",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "AWS v3 SDK Utils",
5
5
  "main": "index.js",
6
6
  "scripts": {