MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / delete_scan_job

Method delete_scan_job

db_manager.py:2115–2133  ·  view source on GitHub ↗

Delete a scan job and its findings. Args: scan_id: Scan ID to delete Returns: bool: True if successful

(self, scan_id: str)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

get_connectionMethod · 0.95
cursorMethod · 0.80
commitMethod · 0.80
errorMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected