Skip to content

Commit d5daa8e

Browse files
Update src/backend/sql_agents/process_batch.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f99f1cf commit d5daa8e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/backend/sql_agents/process_batch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ async def process_batch_async(
4949
await batch_service.update_batch(batch_id, ProcessStatus.IN_PROGRESS)
5050
except Exception as exc:
5151
logger.error("Error updating batch status", batch_id=batch_id, error=str(exc))
52+
# Mark batch as failed and stop further processing if initialization fails
53+
await batch_service.update_batch(batch_id, ProcessStatus.FAILED)
54+
return
5255

5356
# Get the global SQL agents instance
5457
sql_agents = get_sql_agents()

0 commit comments

Comments
 (0)