feat: ingestion task streaming feedback

This commit is contained in:
Per Stark
2025-05-13 21:45:57 +02:00
parent 850878d5c3
commit d504903db3
13 changed files with 271 additions and 88 deletions

View File

@@ -45,12 +45,12 @@ impl IngestionTask {
content: IngestionPayload,
user_id: String,
db: &SurrealDbClient,
) -> Result<(), AppError> {
let job = Self::new(content, user_id).await;
) -> Result<IngestionTask, AppError> {
let task = Self::new(content, user_id).await;
db.store_item(job).await?;
db.store_item(task.clone()).await?;
Ok(())
Ok(task)
}
// Update job status