diff --git a/common.js b/common.js index 76f3843..86a2afc 100644 --- a/common.js +++ b/common.js @@ -172,9 +172,9 @@ exports.retryableUpdate = function (dynamoDB, updateRequest, callback) { var writeRetryLimit = 100; var done = false; - async.whilst(function () { + async.whilst(function test(test_cb) { // retry until the try count is hit - return tryNumber < writeRetryLimit && done === false; + test_cb(null, tryNumber < writeRetryLimit && done === false); }, function (asyncCallback) { tryNumber++; diff --git a/dist/AWSLambdaRedshiftLoader-2.7.2.zip b/dist/AWSLambdaRedshiftLoader-2.7.2.zip new file mode 100644 index 0000000..637f133 Binary files /dev/null and b/dist/AWSLambdaRedshiftLoader-2.7.2.zip differ diff --git a/index.js b/index.js index b63e6bf..f29c055 100644 --- a/index.js +++ b/index.js @@ -95,10 +95,10 @@ exports.getConfigWithRetry = function (prefix, callback) { ConsistentRead: true }; - async.whilst(function () { + async.whilst(function test(test_cb) { // return OK if the proceed flag has been set, or if // we've hit the retry count - return !proceed && tryNumber < lookupConfigTries; + test_cb(!proceed && tryNumber < lookupConfigTries); }, function (callback) { tryNumber++; diff --git a/package-lock.json b/package-lock.json index 4c29c82..4312f33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "aws-lambda-redshift-loader", - "version": "2.7.1", + "version": "2.7.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index fa4b81d..91e1a71 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "aws-lambda-redshift-loader", "description": "An Amazon Redshift Database Loader written for AWS Lambda", - "version": "2.7.1", + "version": "2.7.2", "homepage": "http://github.com/awslabs/aws-lambda-redshift-loader", "bugs": { "url": "http://github.com/awslabs/aws-lambda-redshift-loader/issues",