Expose a route to get the update file content of a task

This commit is contained in:
Kerollmops 2025-02-10 14:05:32 +01:00
parent 0c3e7fe963
commit df40533741
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
4 changed files with 98 additions and 1 deletions

View file

@ -8,6 +8,7 @@ mod tasks_test;
mod test;
use std::collections::BTreeMap;
use std::fs::File as StdFile;
use std::time::Duration;
use file_store::FileStore;
@ -216,6 +217,11 @@ impl Queue {
}
}
/// Open and returns the task's content File.
pub fn update_file(&self, uuid: Uuid) -> file_store::Result<StdFile> {
self.file_store.get_update(uuid)
}
/// Delete a file from the index scheduler.
///
/// Counterpart to the [`create_update_file`](IndexScheduler::create_update_file) method.