summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-08-17 11:41:52 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-08-31 08:49:42 +0200
commit39294cfc0d1058c9f718d5e9664f9ad0e59bc0eb (patch)
tree8527f51f730a2aef12157503a3a64c77862a252d
parent2fdfa6e439bd501587b3e67e6436c9cceccde5e7 (diff)
Fix: Construct logfile name properly
Previously we constructed <log dir>/<job id>/.log but the job id shouldn't be a directory name but the filename of the logfile. This patch fixes this bug. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net> (cherry picked from commit 3922865ad3950564e96ca2e4be974564fd798aef)
-rw-r--r--src/endpoint/scheduler.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/endpoint/scheduler.rs b/src/endpoint/scheduler.rs
index 2374aa9..3deeff2 100644
--- a/src/endpoint/scheduler.rs
+++ b/src/endpoint/scheduler.rs
@@ -435,7 +435,7 @@ impl<'a> LogReceiver<'a> {
async fn get_logfile(&self) -> Option<Result<tokio::io::BufWriter<tokio::fs::File>>> {
if let Some(log_dir) = self.log_dir.as_ref() {
Some({
- let path = log_dir.join(self.job_id.to_string()).join(".log");
+ let path = log_dir.join(format!("{}.log", self.job_id.to_string()));
tokio::fs::OpenOptions::new()
.create(true)
.create_new(true)