| | |
| | | @Service |
| | | public class PatrolService { |
| | | |
| | | private static final int SCHEDULE_TIME_INTERVAL = 5; |
| | | private static final int SCHEDULE_TIME_INTERVAL = 300; |
| | | |
| | | private static final Map<String, ScheduledFuture<?>> AGV_PATROL_MAP = new ConcurrentHashMap<>(); |
| | | public static final Map<String, ScheduledFuture<?>> AGV_PATROL_MAP = new ConcurrentHashMap<>(); |
| | | |
| | | private final RedisSupport redis = RedisSupport.defaultRedisSupport; |
| | | |
| | |
| | | } |
| | | }; |
| | | |
| | | ScheduledFuture<?> scheduledFuture = scheduler.scheduleAtFixedRate(patrolTask, 0, SCHEDULE_TIME_INTERVAL, TimeUnit.SECONDS); |
| | | ScheduledFuture<?> scheduledFuture = scheduler.scheduleAtFixedRate(patrolTask, 0, SCHEDULE_TIME_INTERVAL, TimeUnit.MILLISECONDS); |
| | | |
| | | AGV_PATROL_MAP.put(agvNo, scheduledFuture); |
| | | log.info("已启动AGV " + agvNo + " 的跑库任务。"); |