@@ -213,7 +213,7 @@ def process_all_collections(self) -> Dict[str, List[Dict]]:
213
213
overall_status = "error" if any_collection_failed else "success"
214
214
overall_message = "Some collections failed to process" if any_collection_failed else "All collections processed successfully"
215
215
216
- # Add the overall status only to collections that actually failed
216
+ # Add the overall status to each collection's results
217
217
for collection_name in results .keys ():
218
218
# Check if this collection had any errors (excluding overall_status operations)
219
219
collection_has_errors = any (
@@ -222,21 +222,23 @@ def process_all_collections(self) -> Dict[str, List[Dict]]:
222
222
for op in results [collection_name ]
223
223
)
224
224
225
- # Only add overall_status to collections that failed
226
- if collection_has_errors :
227
- results [collection_name ].append ({
228
- "operation" : "overall_status" ,
229
- "message" : overall_message ,
230
- "details_type" : "overall" ,
231
- "details" : {
232
- "collections_processed" : len (self .collection_configs ),
233
- "collections_failed" : sum (1 for result in results .values ()
234
- if any (isinstance (op , dict ) and op .get ("status" ) == "error"
235
- and op .get ("operation" ) != "overall_status"
236
- for op in result ))
237
- },
238
- "status" : overall_status
239
- })
225
+ # Determine this collection's status
226
+ collection_status = "error" if collection_has_errors else "success"
227
+ collection_message = "Collection processing failed" if collection_has_errors else "Collection processed successfully"
228
+
229
+ results [collection_name ].append ({
230
+ "operation" : "overall_status" ,
231
+ "message" : collection_message ,
232
+ "details_type" : "overall" ,
233
+ "details" : {
234
+ "collections_processed" : len (self .collection_configs ),
235
+ "collections_failed" : sum (1 for result in results .values ()
236
+ if any (isinstance (op , dict ) and op .get ("status" ) == "error"
237
+ and op .get ("operation" ) != "overall_status"
238
+ for op in result ))
239
+ },
240
+ "status" : collection_status
241
+ })
240
242
241
243
return results
242
244
0 commit comments