mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-17 17:10:05 +00:00
feat(pollJobState): improved loggging
This commit is contained in:
@@ -206,10 +206,11 @@ const doPoll = async (
|
|||||||
|
|
||||||
pollCount++
|
pollCount++
|
||||||
|
|
||||||
|
const jobHref = postedJob.links.find((l: Link) => l.rel === 'self')!.href
|
||||||
|
|
||||||
if (pollOptions?.streamLog) {
|
if (pollOptions?.streamLog) {
|
||||||
const jobUrl = postedJob.links.find((l: Link) => l.rel === 'self')
|
|
||||||
const { result: job } = await requestClient.get<Job>(
|
const { result: job } = await requestClient.get<Job>(
|
||||||
jobUrl!.href,
|
jobHref,
|
||||||
authConfig?.access_token
|
authConfig?.access_token
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -231,7 +232,7 @@ const doPoll = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (debug && printedState !== state) {
|
if (debug && printedState !== state) {
|
||||||
logger.info('Polling job status...')
|
logger.info(`Polling: ${requestClient.getBaseUrl() + jobHref}/state`)
|
||||||
logger.info(`Current job state: ${state}`)
|
logger.info(`Current job state: ${state}`)
|
||||||
|
|
||||||
printedState = state
|
printedState = state
|
||||||
|
|||||||
Reference in New Issue
Block a user