(report_id: str)
| 2961 | task["failed_count"] = int(task.get("failed_count") or 0) + 1 |
| 2962 | task["updated_at"] = _task_timestamp() |
| 2963 | |
| 2964 | with _READING_TASK_LOCK: |
| 2965 | task = _READING_TASKS.get(task_id) |
| 2966 | if task: |
| 2967 | task["status"] = "failed" if errors and not completed_docs else "completed" |
| 2968 | task["progress_phase"] = task["status"] |
| 2969 | task["completed_docs"] = completed_docs |
| 2970 | task["errors"] = errors |
| 2971 | task["completed_at"] = _task_timestamp() |
| 2972 | task["updated_at"] = task["completed_at"] |
| 2973 | |
| 2974 | |
| 2975 | def start_reading_reports_task( |
| 2976 | *, |
| 2977 | user_id: str, |
| 2978 | push_id: str, |
| 2979 | paper_numbers: Iterable[Any], |
| 2980 | write_feishu: Optional[bool] = None, |
| 2981 | response_language: str = "zh", |
| 2982 | ) -> Dict[str, Any]: |
| 2983 | push = db_ops.get_push_papers(push_id) |
| 2984 | if not push or not push.get("papers"): |
| 2985 | raise ValueError(f"Push not found: {push_id}") |
| 2986 | papers = list(push["papers"]) |
nothing calls this directly
no test coverage detected