@@ -1034,6 +1034,16 @@ def set_process(
1034
1034
fileset ["name" ], candidate_filesets , conn
1035
1035
)
1036
1036
1037
+ for candidate_fileset in candidate_filesets :
1038
+ with conn .cursor () as cursor :
1039
+ cursor .execute (
1040
+ "SELECT id FROM fileset WHERE status = 'current' AND id = %s" ,
1041
+ (candidate_fileset ),
1042
+ )
1043
+ result = cursor .fetchone ()
1044
+ if result :
1045
+ candidate_filesets .remove (candidate_fileset )
1046
+
1037
1047
(
1038
1048
fully_matched_filesets ,
1039
1049
auto_merged_filesets ,
@@ -1056,6 +1066,8 @@ def set_process(
1056
1066
1057
1067
# Final log
1058
1068
with conn .cursor () as cursor :
1069
+ cursor .execute ("UPDATE fileset SET status = 'partial' WHERE status = 'current'" )
1070
+
1059
1071
cursor .execute (
1060
1072
"SELECT COUNT(fileset) from transactions WHERE `transaction` = %s" ,
1061
1073
(transaction_id ,),
@@ -1099,9 +1111,6 @@ def set_filter_by_platform(gameid, candidate_filesets, conn):
1099
1111
if candidate_platform in possible_platform_names :
1100
1112
filtered_candidate_fileset .append (candidate_fileset_id )
1101
1113
1102
- if len (filtered_candidate_fileset ) != 0 :
1103
- print (len (candidate_filesets ), " " , len (filtered_candidate_fileset ), "\n " )
1104
-
1105
1114
# If nothing was filtred, then it is likely, that platform information was not present, so we fallback to original list of candidates.
1106
1115
return (
1107
1116
candidate_filesets
@@ -1135,7 +1144,7 @@ def set_perform_match(
1135
1144
)
1136
1145
status = cursor .fetchone ()["status" ]
1137
1146
if status == "detection" :
1138
- update_fileset_status (cursor , matched_fileset_id , "partial " )
1147
+ update_fileset_status (cursor , matched_fileset_id , "current " )
1139
1148
set_populate_file (fileset , matched_fileset_id , conn , detection )
1140
1149
auto_merged_filesets += 1
1141
1150
if not skiplog :
@@ -1186,7 +1195,7 @@ def set_perform_match(
1186
1195
for candidate_fileset in candidate_filesets :
1187
1196
(is_match , _ ) = is_full_checksum_match (candidate_fileset , fileset , conn )
1188
1197
if is_match :
1189
- update_fileset_status (cursor , candidate_fileset , "partial " )
1198
+ update_fileset_status (cursor , candidate_fileset , "current " )
1190
1199
set_populate_file (fileset , candidate_fileset , conn , detection )
1191
1200
auto_merged_filesets += 1
1192
1201
if not skiplog :
0 commit comments