Skip to content

Commit

Permalink
Fix the problem of blank exec user.
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidhua1996 committed Dec 6, 2024
1 parent 107316a commit e1386b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public TransformExchangisJob buildJob(ExchangisJobInfo inputJob, TransformExchan
inputJob.getName(), inputJob.getId(), inputJob.getEngineType(), inputJob.getJobContent());
//First to convert content to "ExchangisJobInfoContent"
TransformExchangisJob outputJob = new TransformExchangisJob();
outputJob.setCreateUser(Optional.ofNullable(inputJob.getExecuteUser()).orElse(String.valueOf(ctx.getEnv("USER_NAME"))));
outputJob.setCreateUser(StringUtils.isNotBlank(inputJob.getExecuteUser()) ?
inputJob.getExecuteUser() : String.valueOf(ctx.getEnv("USER_NAME")));
try {
if (StringUtils.isNotBlank(inputJob.getJobContent())) {
//First to convert content to "ExchangisJobInfoContent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ public String executeJob(String requestUser, ExchangisJobInfo jobInfo, String ex
}
// Build generator scheduler task
GenerationSchedulerTask schedulerTask = null;
// Importance
// jobInfo.setExecuteUser(execUser);
try {
schedulerTask = new GenerationSchedulerTask(taskGenerator, jobInfo);
} catch (ExchangisTaskGenerateException e) {
Expand Down

0 comments on commit e1386b4

Please sign in to comment.