From d3a8c44650a3b9494948d11f8ddcb71a1147ec98 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 4 Nov 2025 17:02:35 +0800 Subject: [PATCH] bugfix --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f8bfee..e2ee7b4 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ payload = { 'prompt':'gagagag' } x = await longtasks.submit_task(payload) -# x is a dict with has a 'task_id' key +# x is a dict with a 'task_id' key, it must be used to query the status of task return x ``` @@ -39,6 +39,14 @@ query task status ``` taskid = 'mytaskid' task_status = await longtasks.get_status(taskid) +## task_status is a dict +# { +# "status": one of "SUCCEEDED", "FAILED", "PENDING", "RUNNING" +# "result": process_task method returned +# "created_at": task created time +# "started_at": task begin running time +# "finished_at": task finished time, success or failed +# } return task_status ```