Get task by task_id
(task_id: str)
| 1880 | "push_id": push_id, |
| 1881 | "push_time": push_time, |
| 1882 | "papers": papers, |
| 1883 | "metadata": push_metadata, |
| 1884 | } |
| 1885 | |
| 1886 | |
| 1887 | # ============== Task Status Operations ============== |
| 1888 | |
| 1889 | def create_task(task_id: str, task_type: str, user_id: Optional[str] = None) -> int: |
| 1890 | """Create a new task record""" |
| 1891 | conn = get_connection() |
| 1892 | cursor = conn.cursor() |
| 1893 | cursor.execute(""" |
| 1894 | INSERT INTO task_status |
| 1895 | (task_id, task_type, user_id, status, started_at) |
| 1896 | VALUES (?, ?, ?, 'running', CURRENT_TIMESTAMP) |
nothing calls this directly
no test coverage detected