Skip to content

Commit 373b54d

Browse files
authored
Update ingest.py (#439)
1 parent 5399e7d commit 373b54d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ai_ta_backend/rabbitmq/ingest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,15 @@ def main_ingest(self, job_id: str, **inputs: Dict[str | List[str], Any]):
170170
break
171171
if success_fail_dict['failure_ingest']:
172172
logging.error(f"INGEST FAILURE -- About to send to database. success_fail_dict: {success_fail_dict}")
173+
self.sql_session.insert_failed_document({
174+
"s3_path": str(s3_paths),
175+
"readable_filename": readable_filename,
176+
"course_name": course_name,
177+
"url": url,
178+
"base_url": base_url,
179+
"doc_groups": doc_groups,
180+
"error": str(success_fail_dict),
181+
})
173182

174183
# Remove from documents in progress
175184
self.sql_session.delete_document_in_progress(job_id)

0 commit comments

Comments
 (0)