The topic describes how to retrieve the complete information
related to the current status of the application task
associated with the given task ID (UUID
).
Ensure that you have the required roles.
To retrieve the complete information related to current
status of the application task based on the given task ID
use the app_task_status
function.
Press CTRL+C to copymysql> SELECT mysql_tasks.app_task_status('app_user_id', 'task_id');
Replace the following:
app_user_id
: the unique ID of the application user who owns the task.task_id
: the unique task ID (UUID
) of the task for which the current status is required.
For example:
Press CTRL+C to copymysql> SELECT mysql_tasks.app_task_status('app_user_01','2299b512-3b90-11f0-a5dc-02001712c792')\G *************************** 1. row *************************** mysql_tasks.app_task_status('app_user_01','2299b512-3b90-11f0-a5dc-02001712c792'): {"id": "2299b512-3b90-11f0-a5dc-02001712c792", "data": null, "name": "Create table for flight from INDIA", "alias": "Wed-1", "status": "COMPLETED", "message": "Execution finished.", "progress": 100, "row_hash": "998c09ec25530f8f73dd39ac937d2d67", "task_data": {"country": "INDIA", "mysqlMetadata": {"autoGc": true, "events": ["`airportdb`.`2299a825-3b90-11f0-a5dc-02001712c792`", "`airportdb`.`2299a8ab-3b90-11f0-a5dc-02001712c792`"]}}, "task_type": "Async_SQL", "server_uuid": "52cd41ee-16ac-11f0-8bc9-020017253b2b", "progress_bar": "##########", "connection_id": 6396, "starting_time": "2025-05-28 06:51:09.000000", "scheduled_time": "2025-05-28 06:51:09.000000", "estimated_remaining_time": 0.00000, "estimated_completion_time": "2025-05-28 06:51:09.000000"}
This example returns the current status of the
asynchronous task with task ID
2299b512-3b90-11f0-a5dc-02001712c792
.