mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-09 20:55:06 +02:00
Merge pull request #200 from jabdoa2/do_not_crash_when_deleting_source
catch crash when deleting a datasource
This commit is contained in:
@@ -92,6 +92,10 @@ def run_indexing_jobs(db_session: Session) -> None:
|
|||||||
new_indexing_attempts = get_not_started_index_attempts(db_session)
|
new_indexing_attempts = get_not_started_index_attempts(db_session)
|
||||||
logger.info(f"Found {len(new_indexing_attempts)} new indexing tasks.")
|
logger.info(f"Found {len(new_indexing_attempts)} new indexing tasks.")
|
||||||
for attempt in new_indexing_attempts:
|
for attempt in new_indexing_attempts:
|
||||||
|
if attempt.connector is None:
|
||||||
|
logger.warning(f"Skipping index task as connector has been deleted: {attempt}")
|
||||||
|
mark_attempt_failed(attempt, db_session, failure_reason="Connector is null")
|
||||||
|
continue
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Starting new indexing attempt for connector: '{attempt.connector.name}', "
|
f"Starting new indexing attempt for connector: '{attempt.connector.name}', "
|
||||||
f"with config: '{attempt.connector.connector_specific_config}', and "
|
f"with config: '{attempt.connector.connector_specific_config}', and "
|
||||||
|
Reference in New Issue
Block a user