Mark papers as pushed
(paper_ids: List[int])
| 799 | )) |
| 800 | conn.commit() |
| 801 | paper_id = cursor.lastrowid |
| 802 | return paper_id |
| 803 | except sqlite3.IntegrityError: |
| 804 | print(f"Paper already exists: {paper_data.get('arxiv_id')}") |
| 805 | return None |
| 806 | finally: |
| 807 | conn.close() |
| 808 | |
| 809 | |
| 810 | def add_papers_batch(papers_list: List[Dict]) -> int: |
| 811 | """Add multiple papers in a batch""" |
| 812 | count = 0 |
| 813 | for paper in papers_list: |
| 814 | result = add_paper(paper) |
| 815 | if result: |
| 816 | count += 1 |
| 817 | return count |
nothing calls this directly
no test coverage detected