summaryrefslogtreecommitdiffstats
path: root/src/filestore/staging.rs
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-01-22 16:28:15 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-01-25 15:35:21 +0100
commit34291a0442ac6fb66967543f1bbf465c0b3dd731 (patch)
treee4d2feb6fef85527710b6d3d4431903f041eab72 /src/filestore/staging.rs
parent5a51e23ba57491d100f4ffeac5c8657aaa1b011b (diff)
Let the JobHandle::run() return a Vec<Artifact>
Before that change, it returned the dbmodels::Artifact objects, for which we needed to fetch the filestore::Artifact again. This change removes that restriction (improving runtime, of course). Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/filestore/staging.rs')
-rw-r--r--src/filestore/staging.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/filestore/staging.rs b/src/filestore/staging.rs
index b944d84..788cd02 100644
--- a/src/filestore/staging.rs
+++ b/src/filestore/staging.rs
@@ -19,6 +19,7 @@ use indicatif::ProgressBar;
use log::trace;
use result_inspect::ResultInspect;
+use crate::filestore::Artifact;
use crate::filestore::path::ArtifactPath;
use crate::filestore::path::StoreRoot;
use crate::filestore::util::FileStoreImpl;
@@ -100,4 +101,8 @@ impl StagingStore {
pub fn root_path(&self) -> &StoreRoot {
self.0.root_path()
}
+
+ pub fn get(&self, p: &ArtifactPath) -> Option<&Artifact> {
+ self.0.get(p)
+ }
}