自动化立体仓库 - WMS系统
chen.llin
2 天以前 73e42333948a8143c54218cd26435c2233daf279
src/main/java/com/zy/asrs/task/NotifyLogScheduler.java
@@ -2,11 +2,14 @@
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.NotifyLogHandler;
import com.zy.common.properties.SchedulerProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
 * Created by vincent on 2020/7/7
@@ -19,8 +22,14 @@
    @Autowired
    private NotifyLogHandler notifyLogHandler;
    @Resource
    private SchedulerProperties schedulerProperties;
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute() {
        if (!schedulerProperties.isEnabled()) {
            return;
        }
        ReturnT<String> returnT = notifyLogHandler.start();
        if (!returnT.isSuccess()) {
            log.error(returnT.getMsg());