azure-kusto-data
Advanced tools
Comparing version
{ | ||
"name": "azure-kusto-data", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Azure Data Explorer Query SDK", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -145,6 +145,10 @@ // Copyright (c) Microsoft Corporation. | ||
_getClientTimeout(endpoint, properties) { | ||
let timeout = null; | ||
if (properties != null) { | ||
var serverTimeout = properties instanceof ClientRequestProperties ? properties.getTimeout() : properties.timeout; | ||
if (serverTimeout != null) { | ||
if (properties != null && properties instanceof ClientRequestProperties) { | ||
const clientTimeout = properties.getClientTimeout(); | ||
if(clientTimeout){ | ||
return clientTimeout; | ||
} | ||
const serverTimeout = properties.getTimeout(); | ||
if(serverTimeout){ | ||
return serverTimeout + CLIENT_SERVER_DELTA_IN_MILLISECS; | ||
@@ -154,5 +158,5 @@ } | ||
timeout = endpoint == this.endpoints.query ? QUERY_TIMEOUT_IN_MILLISECS : COMMAND_TIMEOUT_IN_MILLISECS; | ||
return timeout; | ||
const defaultTimeout = endpoint == this.endpoints.query ? QUERY_TIMEOUT_IN_MILLISECS : COMMAND_TIMEOUT_IN_MILLISECS; | ||
return defaultTimeout; | ||
} | ||
}; |
@@ -46,2 +46,10 @@ // Copyright (c) Microsoft Corporation. | ||
setClientTimeout(timeoutMillis) { | ||
this._clientTimeOut = timeoutMillis; | ||
} | ||
getClientTimeout() { | ||
return this._clientTimeOut; | ||
} | ||
clearOptions() { | ||
@@ -48,0 +56,0 @@ this._options = {}; |
36881
0.74%777
1.17%