awaitCompletion

abstract suspend fun awaitCompletion(id: JobId, timeout: Duration): JobMetadata?

Waits for the job to complete.

A job is considered completed when it has reached the states Completed, Stuck or Failed.

Return

the completed job or null if timeout was reached before job completed.