File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,21 @@ def sync_project_all_version(project_id: str) -> int:
54
54
submitter .add (file_model )
55
55
submitter .add (Version (** version ))
56
56
57
- removed_count = mongodb_engine .remove (
57
+ removed_version_count = mongodb_engine .remove (
58
58
Version ,
59
59
query .not_in (Version .id , latest_version_id_list ),
60
60
Version .project_id == project_id ,
61
61
)
62
+
63
+ removed_file_count = mongodb_engine .remove (
64
+ File ,
65
+ query .not_in (File .version_id , latest_version_id_list ),
66
+ File .project_id == project_id ,
67
+ )
68
+
62
69
total_count = len (res )
63
70
log .info (
64
- f"Finished sync project { project_id } versions info, total { total_count } versions, removed { removed_count } versions"
71
+ f"Finished sync project { project_id } versions info, total { total_count } versions, removed { removed_version_count } versions and { removed_file_count } files "
65
72
)
66
73
return total_count
67
74
You can’t perform that action at this time.
0 commit comments