Create a new task record
(task_id: str, task_type: str, user_id: Optional[str] = None)
| 1839 | LIMIT 1 |
| 1840 | """, (push_id,)) |
| 1841 | |
| 1842 | row = cursor.fetchone() |
| 1843 | if not row: |
| 1844 | conn.close() |
| 1845 | return None |
| 1846 | |
| 1847 | push_time = row['timestamp'] |
| 1848 | |
| 1849 | # Get all papers in this push with metadata. |
| 1850 | cursor.execute(""" |
| 1851 | SELECT p.*, bl.id as behavior_log_id, bl.metadata |
| 1852 | FROM papers p |
| 1853 | JOIN behavior_logs bl ON p.id = bl.paper_id |
| 1854 | WHERE bl.push_id = ? AND bl.action = 'pushed' |
| 1855 | ORDER BY bl.id ASC |
nothing calls this directly
no test coverage detected