1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

feat(pollJobState): improved loggging

This commit is contained in:
Yury Shkoda
2021-12-20 10:56:52 +03:00
parent f2905ee169
commit 42aec96410

View File

@@ -206,10 +206,11 @@ const doPoll = async (
pollCount++
const jobHref = postedJob.links.find((l: Link) => l.rel === 'self')!.href
if (pollOptions?.streamLog) {
const jobUrl = postedJob.links.find((l: Link) => l.rel === 'self')
const { result: job } = await requestClient.get<Job>(
jobUrl!.href,
jobHref,
authConfig?.access_token
)
@@ -231,7 +232,7 @@ const doPoll = async (
}
if (debug && printedState !== state) {
logger.info('Polling job status...')
logger.info(`Polling: ${requestClient.getBaseUrl() + jobHref}/state`)
logger.info(`Current job state: ${state}`)
printedState = state