From 0d28c7ce3d140f0958e52e192a85e1ab4ca31448 Mon Sep 17 00:00:00 2001 From: Sherylueen Date: Wed, 15 Mar 2023 10:14:14 +0800 Subject: [PATCH] change get operation period (#23) * increase polling interval (#22) * change the cycle of call get operation --------- Co-authored-by: Qinzhou Xu Co-authored-by: Yanwen Liu --- lib/utils/network.js | 4 ++-- src/utils/network.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/utils/network.js b/lib/utils/network.js index 76ce5c22..5e8ba121 100644 --- a/lib/utils/network.js +++ b/lib/utils/network.js @@ -19,8 +19,8 @@ function isResponseOk(status) { return status >= 200 && status <= 299; } exports.isResponseOk = isResponseOk; -const RETRY_AFTER = 2000; -const MAX_RETRY = 900; +const RETRY_AFTER = 30 * 1000; +const MAX_RETRY = 60; function pollUntilDone(token, operationUrl) { return __awaiter(this, void 0, void 0, function* () { let retryCnt = 0; diff --git a/src/utils/network.ts b/src/utils/network.ts index f0485225..44c5e2ce 100644 --- a/src/utils/network.ts +++ b/src/utils/network.ts @@ -6,8 +6,8 @@ export function isResponseOk(status: number): boolean { return status >= 200 && status <= 299; } -const RETRY_AFTER = 2000; -const MAX_RETRY = 900; +const RETRY_AFTER = 30 * 1000; +const MAX_RETRY = 60; export async function pollUntilDone(token: string, operationUrl: string) {