@ikonintegration/ikapi 3.0.16 → 3.0.19
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.
package/package.json
CHANGED
package/src/Database/DDB/IKDB.js
CHANGED
|
@@ -37,8 +37,9 @@ export default class IKDB_DDB extends IKDB {
|
|
|
37
37
|
// localConsole.debug("Starting remote database connection");
|
|
38
38
|
//initialize connection
|
|
39
39
|
this.connection = new DynamoDB({
|
|
40
|
-
region: this.region,
|
|
40
|
+
region: this.region, maxAttempts: IKGlobals.DDBMaxAttempts,
|
|
41
41
|
requestHandler: new NodeHttpHandler({
|
|
42
|
+
connectionTimeout: IKGlobals.DDBHttpTimeout, socketTimeout: IKGlobals.DDBHttpTimeout,
|
|
42
43
|
httpsAgent: new Agent({ keepAlive: false, maxSockets: 50, rejectUnauthorized: true }),
|
|
43
44
|
})
|
|
44
45
|
});
|
|
@@ -34,7 +34,7 @@ export default class IKDBQueryGet extends IKDBBaseQuery {
|
|
|
34
34
|
...(this.limit > 0 ? { Limit: this.limit - (appendingItems ? appendingItems.length : 0) } : {}),
|
|
35
35
|
...(!this.scanIndexForward ? { ScanIndexForward: false } : {}),
|
|
36
36
|
};
|
|
37
|
-
localConsole.log('Querying: ', query, appendingItems.
|
|
37
|
+
localConsole.log('Querying: ', query, appendingItems ? appendingItems.length : null);
|
|
38
38
|
const resp = await dbManager.connection.query(query);
|
|
39
39
|
// localConsole.debug('Raw result: ', resp);
|
|
40
40
|
return resp;
|
package/src/IKGlobals.js
CHANGED
|
@@ -6,6 +6,9 @@ IKGlobals.DBDrivers = {
|
|
|
6
6
|
IKGlobals.CacheDrivers = {
|
|
7
7
|
REDIS: 'REDIS'
|
|
8
8
|
};
|
|
9
|
+
//DDB Client
|
|
10
|
+
IKGlobals.DDBHttpTimeout = 15000;
|
|
11
|
+
IKGlobals.DDBMaxAttempts = 3;
|
|
9
12
|
//Error messages
|
|
10
13
|
IKGlobals.ErrorResponseValidationFail = 'Input validation failed: '; //400
|
|
11
14
|
IKGlobals.ErrorResponseInvalidServerResponse = 'No valid response, this is a system error.'; //400
|