athena-client
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -12,3 +12,4 @@ 'use strict' | ||
baseRetryWait: 200, | ||
retryCountMax: 5, | ||
retryCountMax: 10, | ||
retryWaitMax: 10000, | ||
concurrentExecMax: 5, | ||
@@ -87,6 +88,6 @@ execRightCheckInterval: 100, | ||
while (data.NextToken && data.NextToken !== previousToken) { | ||
previousToken = data.NextToken | ||
let dataTmp = yield request.getQueryResults(queryId, nowConfig, data.NextToken) | ||
data.NextToken = dataTmp.NextToken || null | ||
data.ResultSet.Rows = data.ResultSet.Rows.concat(dataTmp.ResultSet.Rows) | ||
previousToken = data.NextToken | ||
} | ||
@@ -93,0 +94,0 @@ |
@@ -19,3 +19,4 @@ 'use strict' | ||
if (err && isRetryException(err) && canRetry(retryCount, config)) { | ||
let wait = Math.pow(config.baseRetryWait, retryCount++) | ||
let wait = config.baseRetryWait * Math.pow(2, retryCount++) | ||
wait = Math.min(wait, config.retryWaitMax) | ||
return setTimeout(loopFunc, wait) | ||
@@ -125,3 +126,5 @@ } else if (err) { | ||
function isRetryException(err) { | ||
return err.code == "ThrottlingException" || err.code == "TooManyRequestsException" | ||
return err.code == "ThrottlingException" | ||
|| err.code == "TooManyRequestsException" | ||
|| err.message == "Query exhausted resources at this scale factor" | ||
} | ||
@@ -128,0 +131,0 @@ |
{ | ||
"name": "athena-client", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "a nodejs simple aws athena client", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/KoteiIto/node-athena", |
37174
818