| | |
| | | */ |
| | | @Scheduled(cron= "0 0 2 * * ?") |
| | | public void recordRecycle(){ |
| | | System.out.println("-----------执行录像循环----------:"+ DateUtil.YYYY_MM_DD_HH_MM_SS.format(new Date())); |
| | | log.info("-----------执行录像循环----------:"+ DateUtil.YYYY_MM_DD_HH_MM_SS.format(new Date())); |
| | | //文件夹路径 /battery_system/video_system/Debug/www/record/rtp/{streamId}/{day}} |
| | | List<String> videoStreamIds = YamlProperties.videoStreamIds; |
| | | videoStreamIds.forEach(streamId ->{ |
| | |
| | | String dirPath2Remove = dirPath + File.separator + dirList2.get(i); |
| | | File dir2Remove = new File(dirPath2Remove); |
| | | FileUtil.deleteFile(dir2Remove); |
| | | log.info("删除录像文件夹:"+dirPath2Remove); |
| | | } |
| | | }); |
| | | } |