From 919c0c7c06d616b7dc8c65b0f9005ca4d156f491 Mon Sep 17 00:00:00 2001 From: Nikita Ezzhev Date: Thu, 15 Jul 2021 14:13:16 +0300 Subject: [PATCH] Pass custom values to retryOptions --- Tasks/CopyFilesV2/copyfiles.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Tasks/CopyFilesV2/copyfiles.ts b/Tasks/CopyFilesV2/copyfiles.ts index a58b11d6d8f2..887ef5e838e1 100644 --- a/Tasks/CopyFilesV2/copyfiles.ts +++ b/Tasks/CopyFilesV2/copyfiles.ts @@ -45,13 +45,6 @@ async function main(): Promise { followSymbolicLinks: true }; - const retryOptions: RetryOptions = { - timeoutBetweenRetries: 1, - numberOfReties: 1 - }; - - const retryHelper = new RetryHelper(retryOptions); - tl.setResourcePath(path.join(__dirname, 'task.json')); // contents is a multiline input containing glob patterns @@ -72,6 +65,12 @@ async function main(): Promise { delayBetweenRetries = 0; } + const retryOptions: RetryOptions = { + timeoutBetweenRetries: delayBetweenRetries, + numberOfReties: retryCount + }; + const retryHelper = new RetryHelper(retryOptions); + const preserveTimestamp: boolean = tl.getBoolInput('preserveTimestamp', false); const ignoreMakeDirErrors: boolean = tl.getBoolInput('ignoreMakeDirErrors', false);