| | |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.RedisKeyType; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.thread.impl.*; |
| | | |
| | |
| | | @Async |
| | | public void init() throws InterruptedException { |
| | | News.info("核心控制层开始初始化..............................................."); |
| | | clearStartupRuntimeLocks(); |
| | | // 初始化消息队列 |
| | | initMq(); |
| | | // 初始化下位机线程 |
| | |
| | | News.info("核心控制层已启动..............................................."); |
| | | } |
| | | |
| | | private void clearStartupRuntimeLocks() { |
| | | redisUtil.del(RedisKeyType.STATION_EXECUTE_COMMAND_LOCK.key); |
| | | // News.info("系统启动时已清理输送站命令执行锁,key={}", RedisKeyType.STATION_EXECUTE_COMMAND_LOCK.key); |
| | | } |
| | | |
| | | private void initMq(){ |
| | | // 初始化堆垛机mq |
| | | List<DeviceConfig> crnList = deviceConfigService.list(new QueryWrapper<DeviceConfig>() |