feat(sj_1.0.0): 优化超时检查的日志

This commit is contained in:
opensnail 2024-05-22 14:39:48 +08:00
parent cb5fda35f7
commit f3a5914337
2 changed files with 3 additions and 1 deletions

View File

@ -63,7 +63,7 @@ public class JobTimeoutCheckTask implements TimerTask<Long> {
instanceInterrupt.stop(stopJobContext);
SpringContext.getContext().publishEvent(new JobTaskFailAlarmEvent(taskBatchId));
SnailJobLog.REMOTE.info("超时中断.taskBatchId:[{}]", taskBatchId);
SnailJobLog.LOCAL.info("超时中断.taskBatchId:[{}]", taskBatchId);
}
@Override

View File

@ -3,6 +3,7 @@ package com.aizuda.snailjob.server.job.task.support.timer;
import com.aizuda.snailjob.common.core.context.SpringContext;
import com.aizuda.snailjob.common.core.enums.JobOperationReasonEnum;
import com.aizuda.snailjob.common.core.enums.JobTaskBatchStatusEnum;
import com.aizuda.snailjob.common.log.SnailJobLog;
import com.aizuda.snailjob.server.job.task.support.alarm.event.WorkflowTaskFailAlarmEvent;
import com.aizuda.snailjob.server.job.task.support.handler.WorkflowBatchHandler;
import com.aizuda.snailjob.template.datasource.persistence.mapper.WorkflowTaskBatchMapper;
@ -34,6 +35,7 @@ public class WorkflowTimeoutCheckTask implements TimerTask<Long> {
// 超时停止任务
workflowBatchHandler.stop(workflowTaskBatchId, JobOperationReasonEnum.TASK_EXECUTION_TIMEOUT.getReason());
SpringContext.getContext().publishEvent(new WorkflowTaskFailAlarmEvent(workflowTaskBatchId));
SnailJobLog.LOCAL.info("超时中断.workflowTaskBatchId:[{}]", workflowTaskBatchId);
}
@Override