Delete a scan job and its findings. Args: scan_id: Scan ID to delete Returns: bool: True if successful
(self, scan_id: str)
| 2113 | WHERE scan_id = ? |
| 2114 | """, (scan_id,)) |
| 2115 | conn.commit() |
| 2116 | return cursor.rowcount > 0 |
| 2117 | except Exception as e: |
| 2118 | logger.error(f"Failed to mark scan {scan_id} as interrupted: {e}") |
| 2119 | return False |
| 2120 | |
| 2121 | def delete_scan_job(self, scan_id: str) -> bool: |
| 2122 | """ |
| 2123 | Delete a scan job and its findings. |
| 2124 | |
| 2125 | Args: |
| 2126 | scan_id: Scan ID to delete |
| 2127 | |
| 2128 | Returns: |
| 2129 | bool: True if successful |
| 2130 | """ |
| 2131 | try: |
| 2132 | with self.get_connection() as conn: |
| 2133 | cursor = conn.cursor() |
| 2134 | cursor.execute("DELETE FROM scan_jobs WHERE scan_id = ?", (scan_id,)) |
| 2135 | conn.commit() |
| 2136 | return True |
nothing calls this directly
no test coverage detected