getComputeStatus
Get the status of a compute job.
Usage
const = await .({ : 'a-job-id' })
.(?., ?.)Returns
- Type:
NodeComputeJob | undefined
The job, under the jobId you passed, with the node's environment, resources and
payment beside the ComputeJob fields. undefined when the node does not know the job;
it is never another job of yours. The job has finished once its dateFinished is set,
whether it succeeded or not: failed jobs end below 70 (41 when the algorithm failed, 11
when its image could not be pulled, …), so poll on dateFinished and read status for how
the job ended. See getComputeResult for when the
output is ready.
Parameters
config
- Type:
ComputeStatusConfig
Properties
jobId
- Type:
string
<environmentHash>-<jobId>, as compute and
freeCompute return it. A bare id throws: asked for one,
ocean-node lists every job of the consumer instead of filtering. To rebuild the full id
from a bare one, put the first segment of the job's environment id and a dash in front of
it. Anything but ocean-node's exact form, 0x and 64 hex digits, a dash, then 64 hex
digits, throws before a request; the message gives the id's length, not the id.
nodeUri (optional)
- Type:
string
For a job on another node.
agreementId (optional)
- Type:
string