Skip to content

Commit

Permalink
doc: timestamp properties for job and submission
Browse files Browse the repository at this point in the history
  • Loading branch information
trgiangdo committed Sep 27, 2024
1 parent e83f9f0 commit a0e4fe3
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 11 deletions.
11 changes: 11 additions & 0 deletions docs/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ This is the list of changes to Taipy releases as they were published.
[Get all scenarios](../userman/scenario_features/sdm/scenario/index.md#get-all-scenarios) and
[Get primary scenarios](../userman/scenario_features/sdm/scenario/index.md#get-primary-scenarios).

- When the status of a `Job^` changes, the timestamp of the status change is now recorded.
These timestamps can be accessed using the following properties: *submitted_at*, *run_at*,
*finished_at*, *execution_duration*, *pending_duration*, and *blocked_duration*.<br/>
For more information, please refer to
[Job Status](../userman/scenario_features/sdm/job/index.md#job-status).

- The timestamps of the status changes of a `Submission^` are recorded. These timestamps can be
accessed using the following properties: *submitted_at*, *run_at*, *finished_at*, *execution_duration*.<br/>
For more information, please refer to
[Submission Status](../userman/scenario_features/sdm/submission/index.md#submission-status).

<h4><strong><code>taipy-templates</code></strong> 4.0.0 </h4>

- Creating a new application using any template now also supports initializing the application as a
Expand Down
26 changes: 21 additions & 5 deletions docs/userman/scenario_features/sdm/job/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ A `Job^` entity ìs identified by a unique identifier `id` that is generated by

Here is the list of the `Job^`'s attributes:

- _task_: The `Task^` of the job.
- _force_: The force attribute is `True` if the execution of the job has been forced.
- _creation_date_: The date of the creation of the job with the status `SUBMITTED`.
- _status_: The status of the job.
- _stacktrace_: The stacktrace of the exceptions handled during the execution of the jobs.
- *task*: The `Task^` of the job.
- *force*: The force attribute is `True` if the execution of the job has been forced.
- *creation_date*: The date of the creation of the job with the status `SUBMITTED`.
- *status*: The status of the job.
- *stacktrace*: The stacktrace of the exceptions handled during the execution of the jobs.

## Job Status

Expand All @@ -68,6 +68,22 @@ Here is the list of the `Job^`'s attributes:
- `SKIPPED`: The job was and will not be executed.
- `ABANDONED`: The job was abandoned and will not be executed.

When the status of a job changes, the timestamp of the change is recorded. These timestamps can be accessed
using the following properties:

- *submitted_at*: The datetime when the job was submitted.
- *run_at*: The datetime when the job started running.
- *finished_at*: The datetime when the job finished.
- *execution_duration*: The duration of the job execution in seconds, which is the difference between
the *finished_at* and *run_at* timestamps. If the job is not finished, the duration is the difference
between the current time and the *run_at* timestamp.
- *pending_duration*: The duration of the job in the pending state in seconds, which is the duration between
the `PENDING` status and the `RUNNING` status. If the job is pending, the duration is the difference between
the current time and the datetime when the job was in the `PENDING` status.
- *blocked_duration*: The duration of the job in the blocked state in seconds, which is the duration between
the `BLOCKED` status and the `PENDING` status. If the job is blocked, the duration is the difference between
the current time and the datetime when the job was in the `BLOCKED` status.

# Get/Delete Job

Three methods are available to retrieve jobs:
Expand Down
22 changes: 16 additions & 6 deletions docs/userman/scenario_features/sdm/submission/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ For more details and examples on how to submit scenarios, sequences or tasks, se
Here is the list of the `Submission^`'s attributes:

- *entity_id*: The identifier of the entity that was submitted.
- _id_: The identifier of the `Submission^` entity.
- _jobs_: A list of jobs.
- _properties_: A dictionary of additional properties.
- _creation_date_: The date of this submission's creation.
- _submission_status_: The current status of this submission.
- _version_: The string indicates the application version of the submission to instantiate.
- *id*: The identifier of the `Submission^` entity.
- *jobs*: A list of jobs.
- *properties*: A dictionary of additional properties.
- *creation_date*: The date of this submission's creation.
- *submission_status*: The current status of this submission.
- *version*: The string indicates the application version of the submission to instantiate.
If not provided, the latest version is used.

## Submission Status
Expand All @@ -51,6 +51,16 @@ Here is the list of the `Submission^`'s attributes:
- `FAILED`: The submission has a job that failed during its execution.
- `COMPLETED`: The submission has successfully been executed.

The timestamps of the status changes of a `Submission^` are recorded. These timestamps can be accessed
using the following properties:

- *submitted_at*: The datetime when the entity of the submission was submitted.
- *run_at*: The datetime when the first job of the submission started running.
- *finished_at*: The datetime when the all jobs of the submission finished.
- *execution_duration*: The duration of the submission execution in seconds, which is the difference between
the *finished_at* and *run_at*. If the submisison is not finished, the duration is the difference
between the current time and the *run_at*.

# Get/Delete Submission

Three methods are available to get existing submissions:
Expand Down

0 comments on commit a0e4fe3

Please sign in to comment.