aws-sdk-wrap
Advanced tools
Comparing version 3.1.5 to 3.2.0
@@ -0,1 +1,9 @@ | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
const assert = require('assert'); | ||
const util = require('util'); | ||
@@ -15,3 +23,4 @@ | ||
maxRetries, | ||
backoffFunction | ||
backoffFunction, | ||
delaySeconds | ||
}) => { | ||
@@ -21,6 +30,8 @@ const pending = sqsBatch.reduce((p, msg) => { | ||
return Object.assign(p, { | ||
[id]: { | ||
[id]: _objectSpread({ | ||
Id: id, | ||
MessageBody: JSON.stringify(msg) | ||
} | ||
}, delaySeconds === null ? {} : { | ||
DelaySeconds: delaySeconds | ||
}) | ||
}); | ||
@@ -49,7 +60,10 @@ }, {}); | ||
maxRetries = 10, | ||
backoffFunction = count => 30 * count ** 2 | ||
backoffFunction = count => 30 * count ** 2, | ||
delaySeconds = null | ||
} = {}) => { | ||
assert(batchSize <= 10, 'AWS sqs:sendMessageBatch restriction'); | ||
const result = await Promise.all(chunk(msgs, batchSize).map(sqsBatch => sendBatch(sqsBatch, queueUrl, call, { | ||
maxRetries, | ||
backoffFunction | ||
backoffFunction, | ||
delaySeconds | ||
}))); | ||
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Z3RoICE9PSByZXN1bHQucmVkdWNlKChwLCBjKSA9PiBwICsgYy5yZWR1Y2UoKHByZXYsIGN1cikgPT4gcHJldiArIGN1ci5TdWNjZXNzZnVsLmxlbmd0aCwgMCksIDApKSB7XG4gICAgICB0aHJvdyBuZXcgU2VuZE1lc3NhZ2VCYXRjaEVycm9yKHJlc3VsdCk7XG4gICAgfVxuICAgIHJldHVybiByZXN1bHQ7XG4gIH1cbn0pO1xuIl19 |
{ | ||
"name": "aws-sdk-wrap", | ||
"version": "3.1.5", | ||
"version": "3.2.0", | ||
"description": "Wrapper around aws-sdk", | ||
@@ -41,8 +41,8 @@ "main": "lib/index.js", | ||
"@blackflux/eslint-plugin-rules": "1.3.7", | ||
"@blackflux/robo-config-plugin": "2.5.11", | ||
"aws-sdk": "2.516.0", | ||
"babel-eslint": "10.0.2", | ||
"@blackflux/robo-config-plugin": "2.5.12", | ||
"aws-sdk": "2.519.0", | ||
"babel-eslint": "10.0.3", | ||
"chai": "4.2.0", | ||
"coveralls": "3.0.6", | ||
"eslint": "6.2.1", | ||
"eslint": "6.2.2", | ||
"eslint-config-airbnb-base": "14.0.0", | ||
@@ -53,3 +53,3 @@ "eslint-plugin-import": "2.18.2", | ||
"eslint-plugin-mocha": "6.1.0", | ||
"js-gardener": "2.0.77", | ||
"js-gardener": "2.0.78", | ||
"node-tdd": "2.1.0", | ||
@@ -56,0 +56,0 @@ "nyc": "14.1.1", |
@@ -122,2 +122,8 @@ # AWS SDK Wrap | ||
The length of time the function will wait after each failed request before retrying. | ||
The length of time the function will wait after each failed request before retrying. | ||
#### delaySeconds | ||
Type: `integer`<br> | ||
Default: `null` | ||
Set [DelaySeconds](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html) option. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28118
134
129