Skip to content

Commit

Permalink
Fix the problem in log path.
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidhua1996 committed Dec 23, 2024
1 parent e1386b4 commit 07895a3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import com.webank.wedatasphere.exchangis.job.launcher.domain.LaunchableExchangisJob;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
Expand Down Expand Up @@ -65,7 +66,8 @@ public LaunchedExchangisJobEntity(LaunchableExchangisJob job){
this.jobExecutionId = job.getJobExecutionId();
this.jobParams = job.getJobParams();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String logPath = this.executeUser + IOUtils.DIR_SEPARATOR_UNIX +
String logPath = StringUtils.isNotBlank(this.executeUser)? this.executeUser : this.createUser
+ IOUtils.DIR_SEPARATOR_UNIX +
simpleDateFormat.format(new Date()) + IOUtils.DIR_SEPARATOR_UNIX + this.jobExecutionId;
logPath = EnvironmentUtils.getServerAddress() + "@" + logPath;
this.logPath = logPath;
Expand Down

0 comments on commit 07895a3

Please sign in to comment.