@cubejs-backend/athena-driver
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -32,6 +32,2 @@ const AWS = require('aws-sdk'); | ||
queryToken(queryString) { | ||
return crypto.createHash('md5').update(queryString).digest('hex'); | ||
} | ||
sleep(ms) { | ||
@@ -49,4 +45,3 @@ return new Promise((resolve) => { | ||
OutputLocation: this.config.S3OutputLocation | ||
}, | ||
ClientRequestToken: this.queryToken(queryString) | ||
} | ||
}); | ||
@@ -58,4 +53,10 @@ while (true) { | ||
const status = queryExecution.QueryExecution.Status.State; | ||
if (status === 'FAILED') { | ||
throw new Error(queryExecution.QueryExecution.Status.StateChangeReason); | ||
} | ||
if (status === 'CANCELLED') { | ||
throw new Error('Query has been cancelled'); | ||
} | ||
if ( | ||
status === 'SUCCEEDED' || status === 'FAILED' || status === 'CANCELLED' | ||
status === 'SUCCEEDED' | ||
) { | ||
@@ -62,0 +63,0 @@ const allRows = []; |
@@ -5,3 +5,3 @@ { | ||
"author": "Statsbot, Inc.", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"engines": { | ||
@@ -8,0 +8,0 @@ "node": ">=8.11.1" |
20951
79