Skip to content

Commit

Permalink
[Chore](Job)print log before task execute (#28962)
Browse files Browse the repository at this point in the history
  • Loading branch information
CalvinKirs authored Dec 25, 2023
1 parent 17917a0 commit 2dc7d82
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 @@ -42,9 +42,10 @@ public void onEvent(ExecuteTaskEvent<T> executeTaskEvent) {
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public void onEvent(TimerJobEvent<T> event) {
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) {
Expand Down

0 comments on commit 2dc7d82

Please sign in to comment.