(user_id: str)
| 3017 | task: Dict[str, Any] = { |
| 3018 | "task_id": task_id, |
| 3019 | "kind": "reading_reports", |
| 3020 | "status": "queued", |
| 3021 | "progress_phase": "queued", |
| 3022 | "user_id": user_id, |
| 3023 | "push_id": push_id, |
| 3024 | "selected_numbers": selected, |
| 3025 | "total_count": len(docs), |
| 3026 | "completed_count": 0, |
| 3027 | "failed_count": 0, |
| 3028 | "created_docs": _doc_payloads(docs), |
| 3029 | "internal_docs": docs, |
| 3030 | "response_language": language, |
| 3031 | "write_feishu": write_feishu, |
| 3032 | "created_at": now, |
| 3033 | "updated_at": now, |
| 3034 | } |
| 3035 | thread = threading.Thread(target=_finish_reading_task, args=(task_id,), daemon=True) |
| 3036 | task["thread"] = thread |
| 3037 | with _READING_TASK_LOCK: |
| 3038 | _READING_TASKS[task_id] = task |
| 3039 | _prune_task_registry(_READING_TASKS) |
| 3040 | thread.start() |
nothing calls this directly
no test coverage detected