diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-02-24 20:22:23 +0100 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-02-24 20:23:43 +0100 |
commit | 4f55cc78b19365705c7e7b93b6919d995391e15c (patch) | |
tree | 79cba951ee86fc09fc26dd83b8fd56572289ac60 /src/endpoint | |
parent | cc395116613dfb8469d6a4e5ec9fce6a96772a7c (diff) |
Move constants to dedicated module
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/endpoint')
-rw-r--r-- | src/endpoint/configured.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs index b90263e..849a76c 100644 --- a/src/endpoint/configured.rs +++ b/src/endpoint/configured.rs @@ -343,7 +343,7 @@ impl<'a> PreparedContainer<'a> { .into_iter() .map(|entry| async { let source_path = entry.path(); - let destination = PathBuf::from("/inputs").join({ + let destination = PathBuf::from(crate::consts::INPUTS_DIR_PATH).join({ source_path .file_name() .ok_or_else(|| anyhow!("Not a file: {}", source_path.display())) @@ -402,7 +402,7 @@ impl<'a> PreparedContainer<'a> { container.id() ) })?; - let destination = PathBuf::from("/inputs/").join(artifact_file_name); + let destination = PathBuf::from(crate::consts::INPUTS_DIR_PATH).join(artifact_file_name); trace!( "Copying {} to container: {}:{}", art.display(), @@ -456,7 +456,7 @@ impl<'a> PreparedContainer<'a> { container: &Container<'ca>, script: &Script, ) -> Result<()> { - let script_path = PathBuf::from("/script"); + let script_path = PathBuf::from(crate::consts::SCRIPT_PATH); container .copy_file_into(script_path, script.as_ref().as_bytes()) .await @@ -637,9 +637,9 @@ impl<'a> ExecutedContainer<'a> { Some((true, _)) | None => { let container = self.endpoint.docker.containers().get(&self.create_info.id); - trace!("Fetching /outputs from container {}", self.create_info.id); + trace!("Fetching {} from container {}", crate::consts::OUTPUTS_DIR_PATH, self.create_info.id); let tar_stream = container - .copy_from(&PathBuf::from("/outputs/")) + .copy_from(&PathBuf::from(crate::consts::OUTPUTS_DIR_PATH)) .map(|item| { item.with_context(|| { anyhow!( |