From 009069169f7f7751fb0f614e108f327f871d6458 Mon Sep 17 00:00:00 2001 From: Yury Shkoda Date: Mon, 30 Nov 2020 12:45:37 +0300 Subject: [PATCH] chore(pollJobState): updated docs and added note --- src/SASViyaApiClient.ts | 3 ++- src/SASjs.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SASViyaApiClient.ts b/src/SASViyaApiClient.ts index 20f4294..2710221 100644 --- a/src/SASViyaApiClient.ts +++ b/src/SASViyaApiClient.ts @@ -429,7 +429,7 @@ export class SASViyaApiClient { * @param debug - when set to true, the log will be returned. * @param expectWebout - when set to true, the automatic _webout fileref will be checked for content, and that content returned. This fileref is used when the Job contains a SASjs web request (as opposed to executing arbitrary SAS code). * @param waitForResult - when set to true, function will return the session - * @param pollOptions - an object that represents poll interval and maximum amount of attempts. + * @param pollOptions - an object that represents poll interval(milliseconds) and maximum amount of attempts. Object example: { MAX_POLL_COUNT: 24 * 60 * 60, POLL_INTERVAL: 1000 }. */ public async executeScript( jobPath: string, @@ -1246,6 +1246,7 @@ export class SASViyaApiClient { this.folderMap.set(path, itemsAtRoot) } + // REFACTOR: set default value for 'pollOptions' attribute private async pollJobState( postedJob: any, etag: string | null, diff --git a/src/SASjs.ts b/src/SASjs.ts index 7efc27c..3e2c2e4 100644 --- a/src/SASjs.ts +++ b/src/SASjs.ts @@ -712,7 +712,7 @@ export default class SASjs { * @param accessToken - a valid access token that is authorised to execute compute jobs. * The access token is not required when the user is authenticated via the browser. * @param waitForResult - a boolean that indicates whether the function needs to wait for execution to complete. - * @param pollOptions - an object that represents poll interval and maximum amount of attempts. + * @param pollOptions - an object that represents poll interval(milliseconds) and maximum amount of attempts. Object example: { MAX_POLL_COUNT: 24 * 60 * 60, POLL_INTERVAL: 1000 }. */ public async startComputeJob( sasJob: string,