@itentialopensource/adapter-utils 5.10.17 → 5.10.18

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.
@@ -3106,7 +3106,7 @@ function requestAuthenticate(request, entitySchema, invalidToken, callProperties
3106
3106
  }
3107
3107
 
3108
3108
  // format the authentication string
3109
- log.debug(`${origin}: ${JSON.stringify(propUtilInst.scrubSensitiveInfo(tres, addSensitiveItems))} being used for user: ${useUser}`);
3109
+ log.debug(`${origin}: ${JSON.stringify(propUtilInst.scrubSensitiveInfo(tres, addSensitiveItems))} being used`);
3110
3110
  const authStrs = [];
3111
3111
  if (callProperties && callProperties.authentication && callProperties.authentication.auth_field_format) {
3112
3112
  if (Array.isArray(callProperties.authentication.auth_field_format)) {
@@ -3168,7 +3168,7 @@ function requestAuthenticate(request, entitySchema, invalidToken, callProperties
3168
3168
  return callback(null, errorObj);
3169
3169
  }
3170
3170
 
3171
- log.debug(`${origin}: ${JSON.stringify(propUtilInst.scrubSensitiveInfo(tokenObj, addSensitiveItems))} being used for user: ${useUser}`);
3171
+ log.debug(`${origin}: ${JSON.stringify(propUtilInst.scrubSensitiveInfo(tokenObj, addSensitiveItems))} being used`);
3172
3172
  const authStrs = [];
3173
3173
  if (callProperties && callProperties.authentication && callProperties.authentication.auth_field_format) {
3174
3174
  if (Array.isArray(callProperties.authentication.auth_field_format)) {
@@ -4975,7 +4975,7 @@ class ConnectorRest {
4975
4975
  try {
4976
4976
  if (!throttleEnabled) {
4977
4977
  log.error(`${origin}: Throttling not enabled, no queue`);
4978
- return [];
4978
+ return callback([]);
4979
4979
  }
4980
4980
 
4981
4981
  return throttleEng.getQueue(callback);
package/lib/throttle.js CHANGED
@@ -442,7 +442,12 @@ function gettingCloseInterval(myRequest, transNum, callback) {
442
442
 
443
443
  try {
444
444
  let intRun = false;
445
- const fastInt = (avgTotal / avgSize) * 0.5;
445
+ let fastInt = (avgTotal / avgSize) * 0.5;
446
+
447
+ // prevent timeout overflow errors - 15 min max
448
+ if (fastInt > 900000) {
449
+ fastInt = 900000;
450
+ }
446
451
 
447
452
  // rapid inner interval - should be done when it is almost my time to run.
448
453
  const intervalObject = setInterval(() => {
@@ -1128,6 +1133,11 @@ class SystemXThrottle {
1128
1133
  outerInterval *= 0.95;
1129
1134
  }
1130
1135
 
1136
+ // prevent timeout overflow errors - 2 hours max
1137
+ if (outerInterval > 7200000) {
1138
+ outerInterval = 7200000;
1139
+ }
1140
+
1131
1141
  log.debug(`${origin}: Request ${queueItem.request_id} Transaction ${queueItem.transNum} Outer Interval set to: ${outerInterval}`);
1132
1142
 
1133
1143
  // outer interval to get a turn request
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-utils",
3
- "version": "5.10.17",
3
+ "version": "5.10.18",
4
4
  "description": "Itential Adapter Utility Libraries",
5
5
  "scripts": {
6
6
  "postinstall": "node utils/setup.js",