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
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
14 changed files with 303 additions and 10 deletions

View file

@ -141,6 +141,12 @@ pub enum KindDump {
instance_uid: Option<InstanceUid>,
},
SnapshotCreation,
Export {
url: String,
indexes: Vec<String>,
skip_embeddings: bool,
api_key: Option<String>,
},
UpgradeDatabase {
from: (u32, u32, u32),
},
@ -213,6 +219,14 @@ impl From<KindWithContent> for KindDump {
KindDump::DumpCreation { keys, instance_uid }
}
KindWithContent::SnapshotCreation => KindDump::SnapshotCreation,
KindWithContent::Export { url, indexes, skip_embeddings, api_key } => {
KindDump::Export {
url,
indexes: indexes.into_iter().map(|pattern| pattern.to_string()).collect(),
skip_embeddings,
api_key,
}
}
KindWithContent::UpgradeDatabase { from: version } => {
KindDump::UpgradeDatabase { from: version }
}