getComputeLogs
Read the algorithm's logs.
New in v2. While the job runs, the logs stream live from the container. Once it has finished
(the node has set its dateFinished, also when it failed), the node no longer serves them
live, so this streams the job's algorithmLog result (algorithm.log) instead.
Usage
const = await .({ : 'a-job-id' })
for await (const of ) ..()Returns
- Type:
ComputeResultStream
An AsyncIterable<Uint8Array> of the log text. Throws when the node does not know the job,
or a finished job has no algorithmLog result (a job that failed before its algorithm ran,
such as one whose image could not be pulled, has none).
Parameters
config
- Type:
ComputeLogsConfig
jobId (the qualified id compute() returns), and optionally nodeUri and signal.
signal
- Type:
AbortSignal
Stops a running job's live logs: the wait for its first output, which has no timeout (the
node sends nothing until the job writes), and the stream once it has started. A finished
job's algorithmLog is read as streamComputeResult reads a result.