| | |
| | | |
| | | @PostConstruct |
| | | public void loadCameras() { |
| | | |
| | | //清理本地录像缓存文件 |
| | | String tempPath = ARDConfig.getProfile() + Constants.LOCAL_RECORD_TEMP_PREFIX; |
| | | FileUtils.deleteFolder(tempPath); |
| | |
| | | for (ArdCameras ardCamera : ardCameras) { |
| | | redisCache.setCacheObject(getCacheKey(ardCamera.getId()), ardCamera); |
| | | } |
| | | |
| | | //清空通道 |
| | | ardChannelMapper.clearArdChannel(); |
| | | //清空流媒体 |
| | | vtduService.clearVtdu(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @Param |
| | | * @return |
| | | */ |
| | | @Scheduled(cron = "0 0/10 * * * ?") |
| | | //@Scheduled(cron = "0 0/10 * * * ?") |
| | | public void clearRecordTemp() |
| | | { |
| | | log.debug("定时清理本地录像缓存文件(超过1天)"); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public int resetCameraLoginId() { |
| | | return ardCamerasMapper.resetCameraLoginId(); |
| | | } |
| | | } |