定时任务队列异常处理

yun-zuoyi
yunhao.wang 6 years ago
parent 2cbffd777d
commit d94b94335a

@ -51,6 +51,7 @@ public class ScheduleQueueReceiver {
LOGGER.info("【MQ-IMPP_SCHEDULE_QUEUE】数据接收成功{}",logTaskTime); LOGGER.info("【MQ-IMPP_SCHEDULE_QUEUE】数据接收成功{}",logTaskTime);
// 跟新最后执行时间 及 任务状态 // 跟新最后执行时间 及 任务状态
SysTaskPlan taskPlan = sysTaskPlanService.getSysTaskPlanByNameAndGroup(logTaskTime.getName(),logTaskTime.getGroupName()); SysTaskPlan taskPlan = sysTaskPlanService.getSysTaskPlanByNameAndGroup(logTaskTime.getName(),logTaskTime.getGroupName());
if (taskPlan != null) {
taskPlan.setLastRunDateTime(logTaskTime.getCreateDatetime()); taskPlan.setLastRunDateTime(logTaskTime.getCreateDatetime());
taskPlan.setTaskPlanExecNum(taskPlan.getTaskPlanExecNum() + 1); taskPlan.setTaskPlanExecNum(taskPlan.getTaskPlanExecNum() + 1);
taskPlan.setTaskPlanStatus(logTaskTime.getTaskStatus()); taskPlan.setTaskPlanStatus(logTaskTime.getTaskStatus());
@ -91,6 +92,7 @@ public class ScheduleQueueReceiver {
rabbitTemplate.convertAndSend(PlatformConstWords.IMPP_MESSAGE_LETTER_QUEUE,sysMessage); rabbitTemplate.convertAndSend(PlatformConstWords.IMPP_MESSAGE_LETTER_QUEUE,sysMessage);
} }
} }
}
//信息已处理 //信息已处理
channel.basicAck(message.getMessageProperties().getDeliveryTag(),false); channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);

Loading…
Cancel
Save