| package com.zy.asrs.task; | 
|   | 
| import com.zy.asrs.task.core.ReturnT; | 
| import com.zy.asrs.task.handler.FireHeartHandler; | 
| import lombok.extern.slf4j.Slf4j; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.beans.factory.annotation.Value; | 
| import org.springframework.scheduling.annotation.Scheduled; | 
| import org.springframework.stereotype.Component; | 
|   | 
| @Component | 
| @Slf4j | 
| public class FireHeartScheduler { | 
|   | 
|     @Value("${wcs-slave.doubleDeep}") | 
|     private boolean confirmDeep; | 
|     @Autowired | 
|     private FireHeartHandler fireHeartHandler; | 
|   | 
|     /** | 
|      * | 
|      */ | 
| //    @Scheduled(cron = "0/60 * * * * ? ") | 
|     private void execute() { | 
|         if (!confirmDeep) return; | 
|   | 
|         ReturnT<String> result = fireHeartHandler.start(); | 
|         if (!result.isSuccess()) { | 
|             log.error("消防计时器出错"); | 
|         } | 
|     } | 
|   | 
| } |