Skip to content
LogoLogo

getComputeResult

Get a download URL for a finished job's result.

Usage

const  = await .({ : 'a-job-id' }) 
 
if () {
  const  = await ()
}

Returns

  • Type: string | undefined

undefined — with a log line explaining which — when the node does not know the job, the job has not reached a terminal status, or it has no output result and no resultIndex was given.

Both 70 (JobFinished) and 71 (JobSettle) count as terminal: by the time a job reaches 71 the algorithm has run and its outputs are listed, and only the payment-claim cron is outstanding. There is no need to wait through 71.

To stream a large result instead of downloading it through a URL, use streamComputeResult.

Parameters

config

  • Type: ComputeResultConfig

Properties

jobId
  • Type: string
resultIndex (optional)
  • Type: number

Which result to fetch. Defaults to the first result of type output. A job also produces algorithmLog, configrationLog and publishLog entries.

nodeUri (optional)
  • Type: string