Skip to content

Commit

Permalink
Add requestHandler to AWSConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
nuhasha committed Jan 18, 2024
1 parent 3958781 commit 49d70cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions collectors/aws/collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ var async = require('async');
var helpers = require(__dirname + '/../../helpers/aws');
var collectors = require(__dirname + '/../../collectors/aws');
var collectData = require(__dirname + '/../../helpers/shared.js');
// JS SDK v3 does not support global configuration.
// Codemod has attempted to pass values to each service client in this file.
// You may need to update clients outside of this file, if they use global config.

const { Agent } = require('https');
const { Agent: HttpAgent } = require("http");
Expand Down Expand Up @@ -57,7 +54,7 @@ var collect = function(AWSConfig, settings, callback) {
var AWSXRay;
var debugMode = settings.debug_mode;
if (debugMode) AWSXRay = require('aws-xray-sdk');

// Override max sockets
const customRequestHandler = new NodeHttpHandler({
httpsAgent: new Agent({maxSockets: 100}),
httpAgent: new HttpAgent({maxSockets: 100})
Expand Down
4 changes: 2 additions & 2 deletions collectors/aws/collector_multipart.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ var helpers = require(__dirname + '/../../helpers/aws');
var collectors = require(__dirname + '/../../collectors/aws');
var collectData = require(__dirname + '/../../helpers/shared.js');

// Override max sockets
const { Agent } = require('https');
const { Agent: HttpAgent } = require("http");
const { NodeHttpHandler } = require('@aws-sdk/node-http-handler');

var CALLS_CONFIG = {
Expand Down Expand Up @@ -64,7 +64,7 @@ var collect = function(AWSConfig, settings, callback) {
var AWSXRay;
var debugMode = settings.debug_mode;
if (debugMode) AWSXRay = require('aws-xray-sdk');

// Override max sockets
const customRequestHandler = new NodeHttpHandler({
httpsAgent: new Agent({maxSockets: 100}),
httpAgent: new HttpAgent({maxSockets: 100})
Expand Down

0 comments on commit 49d70cb

Please sign in to comment.