The app_task_status_list
routine returns a
paginated list of application task statuses.
This topic contains the following sections:
mysql> SELECT mysql_tasks.app_task_status_list(
IN 'app_user_id' VARCHAR(255),
IN 'task_type' VARCHAR(90),
IN offset INT UNSIGNED,
IN limit INT UNSIGNED);
Following are task_status_list
parameters:
app_user_id
(VARCHAR(255)): specifies the unique ID of the application user who owns the task.task_type
(VARCHAR(80)): specifies the task type for filtering the task statuses. If the value isNULL
, status information for all tasks is included.offset
(INT UNSIGNED): specifies the initial number of rows to skip. The offset value is used for pagination. If the value isNULL
, the offset defaults to0
, and the result is displayed starting from the first row.limit
(INT UNSIGNED): specifies the maximum number of task records to include in the list of tasks. If the value isNULL
, the limit defaults to20
, and up to 20 rows are displayed.
mysql> SELECT JSON_PRETTY(mysql_tasks.app_task_status_list('app_user_01','demo task type', 0, 1));
The output is similar to the following:
| [
{
"id": "a516b352-574c-11f0-9604-020017205654",
"data": {
"Task result": "Finished..."
},
"name": "demo task name",
"alias": "Wed-3",
"status": "COMPLETED",
"message": "Execution finished.",
"progress": 100,
"row_hash": "de3195fc0e2427d9b91cf03b920b96f2",
"task_data": {
"sleep": 5,
"mysqlMetadata": {
"autoGc": true,
"events": [
"`demo_db`.`a516a336-574c-11f0-9604-020017205654`",
"`demo_db`.`a516a3f8-574c-11f0-9604-020017205654`"
]
},
"refresh_period": 1
},
"task_type": "demo task type",
"server_uuid": "5172a252-8a06-11ef-b3bb-02001727ecef",
"progress_bar": "##########",
"starting_time": "2025-07-02 13:58:35.000000",
"scheduled_time": "2025-07-02 13:58:35.000000",
"estimated_remaining_time": 0.00000,
"estimated_completion_time": "2025-07-02 13:58:40.000000"
}
] |
This example returns task status information one asynchronous task associated with the specified application-managed user ID and task type.