summaryrefslogtreecommitdiffstats
path: root/src/endpoint
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-02-08 10:55:03 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-02-08 11:06:00 +0100
commit09ca31a64761610cd2fc98a5668d1676046b2d89 (patch)
tree23bac0fbcc8b92c470fa6c6b20f4c6570e47e55b /src/endpoint
parent2f53c7acf4ad5bd9830d3b122231ed06841811c3 (diff)
parentd319579fc89b5ac09f10abf4bfc77c21b0fc65ce (diff)
Merge branch 'remove-artifact-type'
Diffstat (limited to 'src/endpoint')
-rw-r--r--src/endpoint/configured.rs11
-rw-r--r--src/endpoint/scheduler.rs4
2 files changed, 7 insertions, 8 deletions
diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs
index 822d533..065f83e 100644
--- a/src/endpoint/configured.rs
+++ b/src/endpoint/configured.rs
@@ -390,9 +390,8 @@ impl<'a> PreparedContainer<'a> {
.cloned()
.map(|art| async {
let artifact_file_name = art
- .path()
.file_name()
- .ok_or_else(|| anyhow!("BUG: artifact {} is not a file", art.path().display()))
+ .ok_or_else(|| anyhow!("BUG: artifact {} is not a file", art.display()))
.with_context(|| {
anyhow!(
"Collecting artifacts for copying to container {}",
@@ -402,7 +401,7 @@ impl<'a> PreparedContainer<'a> {
let destination = PathBuf::from("/inputs/").join(artifact_file_name);
trace!(
"Copying {} to container: {}:{}",
- art.path().display(),
+ art.display(),
container.id(),
destination.display()
);
@@ -410,13 +409,13 @@ impl<'a> PreparedContainer<'a> {
.read()
.await
.root_path()
- .join(art.path())?
+ .join(&art)?
.read()
.await
.with_context(|| {
anyhow!(
"Reading artifact {}, so it can be copied to container",
- art.path().display()
+ art.display()
)
})?;
@@ -426,7 +425,7 @@ impl<'a> PreparedContainer<'a> {
.with_context(|| {
anyhow!(
"Copying artifact {} to container {} at {}",
- art.path().display(),
+ art.display(),
container.id(),
destination.display()
)
diff --git a/src/endpoint/scheduler.rs b/src/endpoint/scheduler.rs
index d3e4857..0b404de 100644
--- a/src/endpoint/scheduler.rs
+++ b/src/endpoint/scheduler.rs
@@ -29,7 +29,7 @@ use uuid::Uuid;
use crate::db::models as dbmodels;
use crate::endpoint::Endpoint;
use crate::endpoint::EndpointConfiguration;
-use crate::filestore::Artifact;
+use crate::filestore::ArtifactPath;
use crate::filestore::StagingStore;
use crate::job::JobResource;
use crate::job::RunnableJob;
@@ -146,7 +146,7 @@ impl std::fmt::Debug for JobHandle {
}
impl JobHandle {
- pub async fn run(self) -> Result<Vec<Artifact>> {
+ pub async fn run(self) -> Result<Vec<ArtifactPath>> {
let (log_sender, log_receiver) = tokio::sync::mpsc::unbounded_channel::<LogItem>();
let ep = self.endpoint.read().await;
let endpoint = dbmodels::Endpoint::create_or_fetch(&self.db, ep.name())?;