CapGdlrJobs.Job

Inherits: RefCounted < Object

One run of a job specification.

Description

The jobs service creates jobs. Read them for status, output, and errors.

Properties

Methods


Signals

status_changed(status: JobStatus) 🔗

Emitted when status changes.


Property Descriptions

CapGdlrJobs.JobSpec spec 🔗

The specification of the job.


JobStatus status = 0 🔗

The current status. Setting it emits status_changed.


Variant error = null 🔗

The rejection reason after a failure.


Variant output = null 🔗

The output after completion.


bool aborted = false 🔗

True after CapGdlrJobs.reset_job() aborted the job.


GdbPromise promise = <unknown> 🔗

Resolves with output when the job completes. Rejects with error when the job fails.


Method Descriptions

void _init(spec: CapGdlrJobs.JobSpec) 🔗

Creates a job for spec.


GdbPromise ensure_requirements() 🔗

Sets the status to CapGdlrJobs.WAITING_FOR_REQUIREMENTS and waits for the requirements of the specification. A rejection fails the job.


GdbPromise run(args: Dictionary = {}) 🔗

Sets the status to CapGdlrJobs.RUNNING, runs the specification, and returns promise.