auto-sync: 2026-05-20 20:34:25

This commit is contained in:
cfdaily
2026-05-20 20:34:25 +08:00
parent 2e9c53a267
commit a3b52ce8c7
+5 -11
View File
@@ -171,17 +171,11 @@ class ProjectRegistry:
) )
def delete_project(self, project_id: str) -> bool: def delete_project(self, project_id: str) -> bool:
"""删除项目(仅从注册表移除)""" """逻辑删除项目(status→deleted,不物理删除)"""
conn = self._connect() return self.update_project(
try: project_id,
conn.execute("BEGIN IMMEDIATE") status="deleted",
cursor = conn.execute( )
"DELETE FROM projects WHERE id=?", (project_id,)
)
conn.commit()
return cursor.rowcount > 0
finally:
conn.close()
# =================================================================== # ===================================================================
# 自动发现 # 自动发现