xgt.Job

class xgt.Job(data)

Represents a user-scheduled Job.

An instance of this object is created by job-scheduling functions like xgt.Service.run_job and xgt.Service.schedule_job.

A Job is used as a proxy for a job in the server and allows the user to monitor its execution, possibly cancel it, and learn about its status during and after execution.

Attributes:
end_time

str: Date and time when the job finished running.

error

str: User-friendly error message describing the reason a job failed.

id

int: Identifier of the job.

start_time

str: Date and time when the job was scheduled.

status

str: Status of the job.

trace

str: Very detailed error message for a failed job.

__init__(data)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(data) Initialize self.

Attributes

end_time str: Date and time when the job finished running.
error str: User-friendly error message describing the reason a job failed.
id int: Identifier of the job.
start_time str: Date and time when the job was scheduled.
status str: Status of the job.
trace str: Very detailed error message for a failed job.
end_time

str: Date and time when the job finished running.

This is a formatted string that has a resolution of seconds.

error

str: User-friendly error message describing the reason a job failed.

id

int: Identifier of the job.

A 64-bit integer value that uniquely identifies a job. It is automatically incremented for each scheduled job over the lifetime of the xgtd server process.

start_time

str: Date and time when the job was scheduled.

This is a formatted string that has a resolution of seconds.

status

str: Status of the job.

The possible values are:

scheduled The state after the job has been created, but before it has started running.
running The job is being executed.
completed The job finished successfully.
canceled The job was canceled.
failed The job failed. When the job fails the error and trace properties are populated.
trace

str: Very detailed error message for a failed job.

This error message contains the friendly error message and a stack strace for the code that participated in the error.