fix(core): fix end_user_id reference and add task status tracking

- Fix write_router to use actual_end_user_id instead of end_user_id
- Add task status tracking via Redis in scheduler
- Expose task_id in memory write response
- Fix logging import path in scheduler
This commit is contained in:
Eternity
2026-04-22 17:46:38 +08:00
parent c5ae82c3c2
commit f93ec8d609
5 changed files with 58 additions and 16 deletions

View File

@@ -175,7 +175,7 @@ class MemoryAPIService:
# storage_type,
# user_rag_memory_id or "",
# )
scheduler.push_task(
task_id = scheduler.push_task(
"app.core.memory.agent.write_message",
end_user_id,
{
@@ -190,8 +190,8 @@ class MemoryAPIService:
logger.info(f"Memory write task submitted, end_user_id={end_user_id}")
return {
# "task_id": task.id,
"status": "PENDING",
"task_id": task_id,
"status": "QUEUED",
"end_user_id": end_user_id,
}