auto-sync: 2026-05-20 20:34:25
This commit is contained in:
@@ -171,17 +171,11 @@ class ProjectRegistry:
|
||||
)
|
||||
|
||||
def delete_project(self, project_id: str) -> bool:
|
||||
"""删除项目(仅从注册表移除)"""
|
||||
conn = self._connect()
|
||||
try:
|
||||
conn.execute("BEGIN IMMEDIATE")
|
||||
cursor = conn.execute(
|
||||
"DELETE FROM projects WHERE id=?", (project_id,)
|
||||
)
|
||||
conn.commit()
|
||||
return cursor.rowcount > 0
|
||||
finally:
|
||||
conn.close()
|
||||
"""逻辑删除项目(status→deleted,不物理删除)"""
|
||||
return self.update_project(
|
||||
project_id,
|
||||
status="deleted",
|
||||
)
|
||||
|
||||
# ===================================================================
|
||||
# 自动发现
|
||||
|
||||
Reference in New Issue
Block a user