JobStatus

API: Stable

Describes the current state of the Resource

data class JobStatus(
    val state: JobState,
    val jobParametersJson: ExportedParameters?,
    val startedAt: Long?,
    val expiresAt: Long?,
    val resolvedApplication: Application?,
    val resolvedSupport: ResolvedSupport<Product.Compute, ComputeSupport>?,
    val resolvedProduct: Product.Compute?,
    val allowRestart: Boolean?,
)

The contents of this field depends almost entirely on the specific Resource that this field is managing. Typically, this will contain information such as:

  • A state value. For example, a compute Job might be RUNNING

  • Key metrics about the resource.

  • Related resources. For example, certain Resources are bound to another Resource in a mutually exclusive way, this should be listed in the status section.

Properties
state: JobState The current of state of the `Job`.

This will match the latest state set in the updates

jobParametersJson: ExportedParameters?
startedAt: Long? Timestamp matching when the `Job` most recently transitioned to the `RUNNING` state.

For Jobs which suspend this might occur multiple times. This will always point to the latest pointin time it started running.

expiresAt: Long? Timestamp matching when the `Job` is set to expire.

This is generally equal to startedAt + timeAllocation. Note that this field might be null if the Job has no associated deadline. For Jobs that suspend however, this is more likely to beequal to the initial RUNNING state + timeAllocation.

resolvedApplication: Application? The resolved application referenced by `application`.

This attribute is not included by default unless includeApplication is specified.

resolvedSupport: ResolvedSupport<Product.Compute, ComputeSupport>?
resolvedProduct: Product.Compute? The resolved product referenced by `product`.

This attribute is not included by default unless includeProduct is specified.

allowRestart: Boolean?