This topic describes how to retrieve the paginated list of statuses for all application tasks of a given task type.
Ensure that you have the required roles.
To view the paginated list of statuses for all application
tasks of a given task type. use the
app_task_status_list
function.
Press CTRL+C to copymysql> SELECT mysql_tasks.app_task_status_list('app_user_id', 'task_type', offset, limit);
Replace the following:
app_user_id
: the unique ID of the application user who owns the task.task_type
: filters the task statuses based on a specific task type. If the value isNULL
, status information for all tasks is included.offset
: the number of rows to skip. The offset value is used for pagination.limit
: the maximum number of task records included in the task status list.
For example:
Press CTRL+C to copymysql> SELECT mysql_tasks.task_status_list('Async_SQL', 5, 5)\G *************************** 1. row *************************** mysql_tasks.task_status_list('Async_SQL', 5, 5): [{"id": "69edecea-3b7b-11f0-a5dc-02001712c792", "data": null, "name": "Create table for flight from JAPAN", "alias": "Wed-3", "status": "COMPLETED", "progress": 100, "row_hash": "88501ab305d01512a81204b432eeb672", "task_data": {"country": "JAPAN", "mysqlMetadata": {"autoGc": true, "events": ["`airportdb`.`69eddbea-3b7b-11f0-a5dc-02001712c792`"]}}, "task_type": "Async_SQL", "server_uuid": "52cd41ee-16ac-11f0-8bc9-020017253b2b", "progress_bar": "##########", "starting_time": "2025-05-28 04:22:49.000000", "scheduled_time": "2025-05-28 04:22:49.000000", "estimated_remaining_time": 0.00000, "estimated_completion_time": "2025-05-28 04:22:49.000000"}, {"id": "4f43d993-3b7b-11f0-a5dc-02001712c792", "data": null, "name": "Create table for flight from INDIA", "alias": "Wed-2", "status": "COMPLETED", "progress": 100, "row_hash": "86b1cee5911a48ce4a118742d634d6ce", "task_data": {"country": "INDIA", "mysqlMetadata": {"autoGc": true, "events": ["`airportdb`.`4f43cb11-3b7b-11f0-a5dc-02001712c792`"]}}, "task_type": "Async_SQL", "server_uuid": "52cd41ee-16ac-11f0-8bc9-020017253b2b", "progress_bar": "##########", "starting_time": "2025-05-28 04:22:05.000000", "scheduled_time": "2025-05-28 04:22:05.000000", "estimated_remaining_time": 0.00000, ...
This example returns task status information of all
asynchronous tasks with task type
Async_SQL
.