Spaces:
Running
Running
check
Browse files
__pycache__/validation.cpython-310.pyc
ADDED
Binary file (4.96 kB). View file
|
|
__pycache__/validation.cpython-311.pyc
ADDED
Binary file (10.7 kB). View file
|
|
validation.py
CHANGED
@@ -90,17 +90,17 @@ def validate_records(json_data):
|
|
90 |
results.append(f"β
Record set '{record_set.uuid}' passed validation.")
|
91 |
except func_timeout.exceptions.FunctionTimedOut:
|
92 |
warning_msgs = [str(w.message) for w in record_warnings]
|
93 |
-
|
94 |
if warning_msgs:
|
95 |
-
|
96 |
-
|
97 |
except Exception as e:
|
98 |
warning_msgs = [str(w.message) for w in record_warnings]
|
99 |
error_details = traceback.format_exc()
|
100 |
-
|
101 |
if warning_msgs:
|
102 |
-
|
103 |
-
|
104 |
|
105 |
# Add any warnings from the initial setup
|
106 |
warning_msgs = [str(w.message) for w in caught_warnings]
|
@@ -115,7 +115,7 @@ def validate_records(json_data):
|
|
115 |
except Exception as e:
|
116 |
warning_msgs = [str(w.message) for w in caught_warnings]
|
117 |
error_details = traceback.format_exc()
|
118 |
-
error_message = f"
|
119 |
if warning_msgs:
|
120 |
error_message += "\n\nWarnings:\n" + "\n".join(warning_msgs)
|
121 |
-
return
|
|
|
90 |
results.append(f"β
Record set '{record_set.uuid}' passed validation.")
|
91 |
except func_timeout.exceptions.FunctionTimedOut:
|
92 |
warning_msgs = [str(w.message) for w in record_warnings]
|
93 |
+
msg = f"β οΈ Record set '{record_set.uuid}' generation took too long (>300s)"
|
94 |
if warning_msgs:
|
95 |
+
msg += "\n\nWarnings:\n" + "\n".join(warning_msgs)
|
96 |
+
results.append(msg)
|
97 |
except Exception as e:
|
98 |
warning_msgs = [str(w.message) for w in record_warnings]
|
99 |
error_details = traceback.format_exc()
|
100 |
+
msg = f"β οΈ Record set '{record_set.uuid}' encountered an issue: {str(e)}\n\n{error_details}"
|
101 |
if warning_msgs:
|
102 |
+
msg += "\n\nWarnings:\n" + "\n".join(warning_msgs)
|
103 |
+
results.append(msg)
|
104 |
|
105 |
# Add any warnings from the initial setup
|
106 |
warning_msgs = [str(w.message) for w in caught_warnings]
|
|
|
115 |
except Exception as e:
|
116 |
warning_msgs = [str(w.message) for w in caught_warnings]
|
117 |
error_details = traceback.format_exc()
|
118 |
+
error_message = f"β οΈ Unexpected error during records validation: {str(e)}\n\n{error_details}"
|
119 |
if warning_msgs:
|
120 |
error_message += "\n\nWarnings:\n" + "\n".join(warning_msgs)
|
121 |
+
return True, error_message
|