This topic describes how to view a paginated list of tasks based on the given task type.
Ensure that you have the required roles.
To retrieve application tasks of a specific type with
pagination, use the app_task_list
function.
Press CTRL+C to copymysql> SELECT mysql_tasks.app_task_list('app_user_id', 'task_type', offset, limit);
Replace the following:
app_user_id
: filters the tasks associated with a particular application user.task_type
: filters the tasks based on a specific task type. If the value isNULL
, tasks of all types are 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 list of tasks.
For example:
Press CTRL+C to copymysql> SELECT mysql_tasks.app_task_list('app_user_01','Async_SQL',0,10)\G *************************** 1. row *************************** mysql_tasks.task_status_list('Async_SQL',0,10): [{"id": "bf1ffc2c-3b93-11f0-a5dc-02001712c792", "data": null, "name": "Create table for flight from NORWAY", "alias": "Wed-3", "status": "COMPLETED", "message": "Execution finished.", "progress": 100, "row_hash": "629cc68f9920a4b2c4fc6f9351440b0b", "task_data": {"country": "SPAIN", "mysqlMetadata": {"autoGc": true, "events": ["`airportdb`.`bf1fef38-3b93-11f0-a5dc-02001712c792`", "`airportdb`.`bf1fefc4-3b93-11f0-a5dc-02001712c792`"]}}, "task_type": "Async_SQL", "server_uuid": "52cd41ee-16ac-11f0-8bc9-020017253b2b", "progress_bar": "##########", "starting_time": "2025-05-28 07:17:00.000000", "scheduled_time": "2025-05-28 07:17:00.000000", "estimated_remaining_time": 0.00000, "estimated_completion_time": "2025-05-28 07:17:00.000000"}, {"id": "a966f532-3b93-11f0-a5dc-02001712c792", "data": null, "name": "Create table for flight from SPAIN", "alias": "Wed-2", "status": "COMPLETED", "message": "Execution finished.", ...
This example lists all the application tasks of task type
Async_SQL
.