MySQL HeatWave User Guide
The app_task_status_brief
routine returns
the brief status of an application task, including a subset of
information about the task and its last log entry.
This topic contains the following sections:
mysql> SELECT mysql_tasks.app_task_status_brief(
IN 'app_user_id' VARCHAR(255),
IN 'task_id' VARCHAR(36));
Following are app_task_status_brief
parameters:
app_user_id
(VARCHAR(255)): specifies
the unique ID of the application user who owns the task.
task_id
(VARCHAR(36)): specifies the
unique task ID (UUID
) of the task for
which the current task status is required.
mysql> SELECT JSON_PRETTY(mysql_tasks.app_task_status_brief('app_user_01', @task_id));
The output is similar to the following:
+--------------------------------------------------------------------------------------------------------------------------------------+ | JSON_PRETTY(mysql_tasks.app_task_status_brief('app_user_01', @task_id)) | +--------------------------------------------------------------------------------------------------------------------------------------+ | { "data": { "Task result": "Finished..." }, "status": "COMPLETED", "message": "Execution finished.", "progress": 100 } | +--------------------------------------------------------------------------------------------------------------------------------------+
This example returns basic information related to the
current status of the asynchronous task associated with the
specified application-managed user ID and task ID stored in
the session variable @task_id
.