Коммит
2dfe39e9c9
|
@ -1,3 +1,7 @@
|
|||
## Changes in 2.0.1
|
||||
|
||||
- Fix type issue (See #141)
|
||||
|
||||
## Changes in 2.0.0
|
||||
|
||||
- Multi-region Write support
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"database",
|
||||
"cloud"
|
||||
],
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"author": "Microsoft Corporation",
|
||||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
|
|
|
@ -175,7 +175,7 @@ export const Constants = {
|
|||
CurrentVersion: "2018-06-18",
|
||||
|
||||
SDKName: "azure-cosmos-js",
|
||||
SDKVersion: "2.0.0",
|
||||
SDKVersion: "2.0.1",
|
||||
|
||||
DefaultPrecisions: {
|
||||
DefaultNumberHashPrecision: 3,
|
||||
|
|
|
@ -36,13 +36,17 @@ export class EndpointDiscoveryRetryPolicy implements IRetryPolicy {
|
|||
*/
|
||||
public async shouldRetry(
|
||||
err: ErrorResponse,
|
||||
retryContext: RetryContext,
|
||||
locationEndpoint: string
|
||||
retryContext?: RetryContext,
|
||||
locationEndpoint?: string
|
||||
): Promise<boolean | [boolean, string]> {
|
||||
if (!err) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!retryContext || !locationEndpoint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.globalEndpointManager.enableEndpointDiscovery) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -34,11 +34,15 @@ export class SessionRetryPolicy implements IRetryPolicy {
|
|||
* @param {function} callback - The callback function which takes bool argument which specifies whether the request\
|
||||
* will be retried or not.
|
||||
*/
|
||||
public async shouldRetry(err: ErrorResponse, retryContext: RetryContext): Promise<boolean> {
|
||||
public async shouldRetry(err: ErrorResponse, retryContext?: RetryContext): Promise<boolean> {
|
||||
if (!err) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!retryContext) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.connectionPolicy.EnableEndpointDiscovery) {
|
||||
return false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче