[Chore](Job)print log before task execute (#28962)

This commit is contained in:
Calvin Kirs
2023-12-25 16:55:59 +08:00
committed by GitHub
parent 17917a0adb
commit 2dc7d82aff
2 changed files with 4 additions and 1 deletions

View File

@ -42,9 +42,10 @@ public class DefaultTaskExecutorHandler<T extends AbstractTask> implements WorkH
return;
}
if (task.isCancelled()) {
log.info("task is canceled, ignore");
log.info("task is canceled, ignore. task id is {}", task.getTaskId());
return;
}
log.info("start to execute task, task id is {}", task.getTaskId());
try {
task.runTask();
} catch (Exception e) {

View File

@ -67,6 +67,8 @@ public class DispatchTaskHandler<T extends AbstractJob> implements WorkHandler<T
JobType jobType = event.getJob().getJobType();
for (AbstractTask task : tasks) {
disruptorMap.get(jobType).publishEvent(task, event.getJob().getJobConfig());
log.info("dispatch timer job success, job id is {}, task id is {}",
event.getJob().getJobId(), task.getTaskId());
}
}
} catch (Exception e) {