[Frontend Migration]: Show Scheduled Tasks results
Author: bbilly1Created Dec 27, 2024Updated Jun 19, 2026
Labelsreact migrationfrontend
Domain
Frontend
Description
That is already available through the API, just not implemented in the old frontend. But celery tasks store it's result for currently 24h (I think). Would be nice if we can see the result somewhere, not quite sure where though...
GET /api/task/by-name/: to return a list of all stored task results
GET /api/task/by-name/<task-name>/: a list of results of a specific task.
Example response:
{
"status": "SUCCESS",
"result": "added 2 Videos to Queue",
"traceback": null,
"children": [],
"date_done": "2024-12-27T15:16:59.463428+00:00",
"name": "extract_download",
"args": [],
"kwargs": {
"auto_start": false
},
"worker": "celery@arch",
"retries": 0,
"queue": "celery",
"task_id": "1d5ef399-9f6c-498d-af95-2417d11868c7"
}This would also indicate if the last task execution was successful and give more feedback to the UI that is currently only available through the docker logs.
Example failure response:
{
"status": "FAILURE",
"result": {
"exc_type": "ValueError",
"exc_message": [
"not a valid id_str: fail"
],
"exc_module": "builtins"
},
"traceback": "Traceback (most recent call last):\n File [...] raise ValueError(f\"not a valid id_str: {id_str}\")\nValueError: not a valid id_str: fail\n",
"children": [],
"date_done": "2024-12-27T16:21:01.485271+00:00",
"name": "extract_download",
"args": [
"https://www.youtube.com/watch?v=fail"
],
"kwargs": {
"auto_start": false
},
"worker": "celery@arch",
"retries": 0,
"queue": "celery",
"task_id": "380305e2-9bda-4186-a356-2e1ab1102691"
}Source: tubearchivist/tubearchivist