v9d Phase 2d: Vitals Module Refactoring (Baseline + Blood Pressure) #22
|
|
@ -228,6 +228,9 @@ def batch_evaluate_activities(
|
|||
"errors": 0
|
||||
}
|
||||
|
||||
# Track error details
|
||||
error_details = []
|
||||
|
||||
for activity in activities:
|
||||
activity_dict = dict(activity)
|
||||
try:
|
||||
|
|
@ -246,7 +249,16 @@ def batch_evaluate_activities(
|
|||
|
||||
except Exception as e:
|
||||
logger.error(f"[BATCH-EVAL] Error evaluating {activity_dict['id']}: {e}")
|
||||
error_details.append({
|
||||
"activity_id": activity_dict['id'],
|
||||
"training_type_id": activity_dict.get('training_type_id'),
|
||||
"error": str(e)
|
||||
})
|
||||
stats["errors"] += 1
|
||||
|
||||
# Add error details to stats (limit to first 10)
|
||||
if error_details:
|
||||
stats["error_details"] = error_details[:10]
|
||||
|
||||
logger.info(f"[BATCH-EVAL] Completed: {stats}")
|
||||
return stats
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user