Browse Source

fix k8s task run fail (#13348)

3.2.0-release
caishunfeng 2 years ago committed by GitHub
parent
commit
ba0a253f09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java

5
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java

@ -155,8 +155,13 @@ public class K8sTaskExecutor extends AbstractK8sTaskExecutor {
@Override
public void eventReceived(Action action, Job job) {
logger.info("event received : job:{} action:{}", job.getMetadata().getName(), action);
if (action != Action.ADDED) {
int jobStatus = getK8sJobStatus(job);
logger.info("job {} status {}", job.getMetadata().getName(), jobStatus);
if (jobStatus == TaskConstants.RUNNING_CODE) {
return;
}
setTaskStatus(jobStatus, taskInstanceId, taskResponse, k8STaskMainParameters);
countDownLatch.countDown();
}

Loading…
Cancel
Save