自动化立体仓库 - WMS系统
#
LSH
2023-05-16 2bf65500161ae37c120d0d9af8f6d8dd7afdec75
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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("消防计时器出错");
        }
    }
 
}