Skip to content

Commit

Permalink
Merge pull request #182 from byzer-org/issue-181
Browse files Browse the repository at this point in the history
#181  优化日志信息
  • Loading branch information
allwefantasy authored Oct 30, 2022
2 parents c67ca10 + 6db95eb commit 292a0c3
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,15 @@ public JobLog getJobLog(String user, String jobId, Long offset) {
if (jobLog.getValue() != null) {
jobLog.setValue(
jobLog.getValue().stream().filter(
s -> s.contains(String.format("[owner] [%s] [groupId] [%s]", user, groupId))
|| s.contains(String.format("DriverLogServer: [owner] [%s]", user))
).collect(Collectors.toList())
s -> s.contains(String.format("[owner] [%s] [groupId]", user))
).filter(s-> !s.contains("run command as ShowCommand.`jobs/v2")).map(s -> {
String[] arr = s.split("__MMMMMM__", 2);
if (arr.length == 2) {
return arr[1];
} else {
return s;
}
}).collect(Collectors.toList())
);
} else {
jobLog.setValue(Lists.newArrayList());
Expand Down Expand Up @@ -246,7 +252,7 @@ public boolean isRunning(Integer status) {
return Objects.nonNull(status) && (status == JobInfo.JobStatus.RUNNING || status >= JobInfo.JobStatus.RETRYING);
}

public boolean needRetry(Integer status){
public boolean needRetry(Integer status) {
return config.getExecutionEngineCallbackRetries() > 0 && Objects.nonNull(status)
&& (status == JobInfo.JobStatus.RUNNING || status > JobInfo.JobStatus.RETRYING);
}
Expand Down

0 comments on commit 292a0c3

Please sign in to comment.