taipy.core.Job
Bases: _Entity
, _Labeled
Execution of a Task
.
A job handles the status of the execution, contains the stacktrace of exceptions that were raised during the execution, and notifies subscribers on status change.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The identifier of this job. |
task |
Task
|
The task of this job. |
force |
bool
|
Enforce the job's execution whatever the output data nodes are in cache or not. |
status |
Status
|
The current status of this job. |
creation_date |
datetime
|
The date of this job's creation. |
stacktrace |
List[str]
|
The list of stacktraces of the exceptions raised during the execution. |
version |
str
|
The string indicates the application version of the job to instantiate. If not provided, the latest version is used. |
abandoned()
¶
Set the status to abandoned and notify subscribers.
blocked()
¶
Set the status to blocked and notify subscribers.
canceled()
¶
Set the status to canceled and notify subscribers.
completed()
¶
Set the status to completed and notify subscribers.
failed()
¶
Set the status to failed and notify subscribers.
get_label()
¶
Returns the job simple label prefixed by its owner label.
Returns:
Type | Description |
---|---|
str
|
The label of the job as a string. |
get_simple_label()
¶
Returns the job simple label.
Returns:
Type | Description |
---|---|
str
|
The simple label of the job as a string. |
is_abandoned()
¶
Indicate if the job was abandoned.
Returns:
Type | Description |
---|---|
bool
|
True if the job was abandoned. |
is_blocked()
¶
Indicate if the job is blocked.
Returns:
Type | Description |
---|---|
bool
|
True if the job is blocked. |
is_canceled()
¶
Indicate if the job was canceled.
Returns:
Type | Description |
---|---|
bool
|
True if the job was canceled. |
is_completed()
¶
Indicate if the job has completed.
Returns:
Type | Description |
---|---|
bool
|
True if the job has completed. |
is_deletable()
¶
Indicate if the job can be deleted.
Returns:
Type | Description |
---|---|
bool
|
True if the job can be deleted. False otherwise. |
is_failed()
¶
Indicate if the job has failed.
Returns:
Type | Description |
---|---|
bool
|
True if the job has failed. |
is_finished()
¶
Indicate if the job is finished.
Returns:
Type | Description |
---|---|
bool
|
True if the job is finished. |
is_pending()
¶
Indicate if the job is pending.
Returns:
Type | Description |
---|---|
bool
|
True if the job is pending. |
is_running()
¶
Indicate if the job is running.
Returns:
Type | Description |
---|---|
bool
|
True if the job is running. |
is_skipped()
¶
Indicate if the job was skipped.
Returns:
Type | Description |
---|---|
bool
|
True if the job was skipped. |
is_submitted()
¶
Indicate if the job is submitted.
Returns:
Type | Description |
---|---|
bool
|
True if the job is submitted. |
pending()
¶
Set the status to pending and notify subscribers.
running()
¶
Set the status to running and notify subscribers.
skipped()
¶
Set the status to skipped and notify subscribers.
update_status(exceptions)
¶
Update the job status based on the success or the failure of its execution.