diff --git a/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/listener/CallbackListener.java b/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/listener/CallbackListener.java index 9613edac78..46eb4f64ea 100644 --- a/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/listener/CallbackListener.java +++ b/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/listener/CallbackListener.java @@ -56,7 +56,7 @@ public void handleMessage(JobCallbackDTO callbackDTO) { try { new URL(callbackUrl); } catch (MalformedURLException var5) { - log.error("Callback fail, bad url: {}", callbackUrl); + log.warn("Callback fail, bad url: {}", callbackUrl); return; } callbackDTO.setCallbackUrl(null); diff --git a/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/listener/JobListener.java b/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/listener/JobListener.java index d1b323c28b..3eb1b0e7e0 100644 --- a/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/listener/JobListener.java +++ b/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/engine/listener/JobListener.java @@ -45,6 +45,7 @@ import com.tencent.bk.job.execute.service.TaskInstanceService; import com.tencent.bk.job.execute.statistics.StatisticsService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.stream.annotation.EnableBinding; import org.springframework.cloud.stream.annotation.StreamListener; @@ -357,7 +358,7 @@ private void startStep(StepInstanceBaseDTO stepInstance) { private void callback(TaskInstanceDTO taskInstance, long jobInstanceId, int taskStatus, long currentStepId, RunStatusEnum stepStatus) { - if (taskInstance.getCallbackUrl() != null) { + if (StringUtils.isNotBlank(taskInstance.getCallbackUrl())) { JobCallbackDTO callback = new JobCallbackDTO(); callback.setId(jobInstanceId); callback.setStatus(taskStatus);