Introduce a new route to export documents and enqueue the export task

This commit is contained in:
Clément Renault
2025-06-12 16:23:48 +02:00
committed by Kerollmops
parent ae8c1461e1
commit e74c3b692a
14 changed files with 303 additions and 10 deletions

View File

@ -273,6 +273,7 @@ pub fn swap_index_uid_in_task(task: &mut Task, swap: (&str, &str)) {
K::TaskCancelation { .. }
| K::TaskDeletion { .. }
| K::DumpCreation { .. }
| K::Export { .. } // TODO I have patterns, not index uids
| K::UpgradeDatabase { .. }
| K::SnapshotCreation => (),
};
@ -600,6 +601,14 @@ impl crate::IndexScheduler {
Details::Dump { dump_uid: _ } => {
assert_eq!(kind.as_kind(), Kind::DumpCreation);
}
Details::Export {
url: _,
api_key: _,
exported_documents: _,
skip_embeddings: _,
} => {
assert_eq!(kind.as_kind(), Kind::Export);
}
Details::UpgradeDatabase { from: _, to: _ } => {
assert_eq!(kind.as_kind(), Kind::UpgradeDatabase);
}