mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-05 03:30:05 +00:00
chore: requestClient naming
This commit is contained in:
@@ -14,16 +14,16 @@ import { RequestClient } from '../request/RequestClient'
|
|||||||
* job execution requests.
|
* job execution requests.
|
||||||
*/
|
*/
|
||||||
export class Sas9JobExecutor extends BaseJobExecutor {
|
export class Sas9JobExecutor extends BaseJobExecutor {
|
||||||
private requestClient: Sas9RequestClient
|
private sas9RequestClient: Sas9RequestClient
|
||||||
constructor(
|
constructor(
|
||||||
serverUrl: string,
|
serverUrl: string,
|
||||||
serverType: ServerType,
|
serverType: ServerType,
|
||||||
private jobsPath: string,
|
private jobsPath: string,
|
||||||
private requestClientSingle: RequestClient,
|
private requestClient: RequestClient,
|
||||||
httpsAgentOptions?: https.AgentOptions
|
httpsAgentOptions?: https.AgentOptions
|
||||||
) {
|
) {
|
||||||
super(serverUrl, serverType)
|
super(serverUrl, serverType)
|
||||||
this.requestClient = new Sas9RequestClient(serverUrl, httpsAgentOptions)
|
this.sas9RequestClient = new Sas9RequestClient(serverUrl, httpsAgentOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
async execute(sasJob: string, data: any, config: any) {
|
async execute(sasJob: string, data: any, config: any) {
|
||||||
@@ -63,7 +63,7 @@ export class Sas9JobExecutor extends BaseJobExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.requestClient.login(
|
await this.sas9RequestClient.login(
|
||||||
config.username,
|
config.username,
|
||||||
config.password,
|
config.password,
|
||||||
this.jobsPath
|
this.jobsPath
|
||||||
@@ -74,7 +74,7 @@ export class Sas9JobExecutor extends BaseJobExecutor {
|
|||||||
? 'multipart/form-data; boundary=' + (formData as any)._boundary
|
? 'multipart/form-data; boundary=' + (formData as any)._boundary
|
||||||
: 'text/plain'
|
: 'text/plain'
|
||||||
|
|
||||||
return await this.requestClient!.post(
|
return await this.sas9RequestClient!.post(
|
||||||
apiUrl,
|
apiUrl,
|
||||||
formData,
|
formData,
|
||||||
undefined,
|
undefined,
|
||||||
@@ -91,7 +91,7 @@ export class Sas9JobExecutor extends BaseJobExecutor {
|
|||||||
resString = JSON.stringify(res)
|
resString = JSON.stringify(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.requestClientSingle!.appendRequest(resString, sasJob, config.debug)
|
this.requestClient!.appendRequest(resString, sasJob, config.debug)
|
||||||
|
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
@@ -102,7 +102,7 @@ export class Sas9JobExecutor extends BaseJobExecutor {
|
|||||||
errString = JSON.stringify(errString)
|
errString = JSON.stringify(errString)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.requestClientSingle!.appendRequest(errString, sasJob, config.debug)
|
this.requestClient!.appendRequest(errString, sasJob, config.debug)
|
||||||
|
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user