1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-07 04:20:05 +00:00

feat(pollJobState): added ability to configure poll options

This commit is contained in:
Yury Shkoda
2020-11-30 10:21:49 +03:00
parent 505d85c256
commit 1b117a67aa
4 changed files with 38 additions and 11 deletions

View File

@@ -32,7 +32,8 @@ import {
CsrfToken,
UploadFile,
EditContextInput,
ErrorResponse
ErrorResponse,
PollOptions
} from './types'
import { SASViyaApiClient } from './SASViyaApiClient'
import { SAS9ApiClient } from './SAS9ApiClient'
@@ -711,13 +712,15 @@ 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.
*/
public async startComputeJob(
sasJob: string,
data: any,
config: any = {},
accessToken?: string,
waitForResult?: boolean
waitForResult?: boolean,
pollOptions?: PollOptions
) {
config = {
...this.sasjsConfig,
@@ -738,7 +741,8 @@ export default class SASjs {
data,
accessToken,
!!waitForResult,
false
false,
pollOptions
)
}