|
@@ -1036,25 +1036,26 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
|
|
|
|
|
|
|
public void removePrice(){
|
|
|
- try {
|
|
|
- // 创建MinioClient对象
|
|
|
- MinioClient minioClient = MinioClient.builder()
|
|
|
- .endpoint(endpoint)
|
|
|
- .credentials(accessKey, secretKey)
|
|
|
- .build();
|
|
|
-
|
|
|
- // 指定要删除文件的桶名和目录名
|
|
|
- String bucketName = this.bucketName;
|
|
|
- String prefix = "/camera_picture/normal/";
|
|
|
-
|
|
|
- // 指定要删除的时间点(此处为当前时间之前的时间)
|
|
|
- ZonedDateTime deleteTime = ZonedDateTime.now().minusDays(20); // 删除30天前的文件
|
|
|
-
|
|
|
- // 递归删除指定目录下的所有文件和空目录
|
|
|
- deleteObjectsAndEmptyDirectoriesRecursively(minioClient, bucketName, prefix, deleteTime);
|
|
|
- } catch (Exception e) {
|
|
|
- System.out.println("Error occurred: " + e);
|
|
|
- }
|
|
|
+// try {
|
|
|
+// // 创建MinioClient对象
|
|
|
+// MinioClient minioClient = MinioClient.builder()
|
|
|
+// .endpoint(endpoint)
|
|
|
+// .credentials(accessKey, secretKey)
|
|
|
+// .build();
|
|
|
+//
|
|
|
+// // 指定要删除文件的桶名和目录名
|
|
|
+// String bucketName = this.bucketName;
|
|
|
+// String prefix = "/camera_picture/normal/";
|
|
|
+//
|
|
|
+// // 指定要删除的时间点(此处为当前时间之前的时间)
|
|
|
+// ZonedDateTime deleteTime = ZonedDateTime.now().minusDays(20); // 删除30天前的文件
|
|
|
+//
|
|
|
+// // 递归删除指定目录下的所有文件和空目录
|
|
|
+// deleteObjectsAndEmptyDirectoriesRecursively(minioClient, bucketName, prefix, deleteTime);
|
|
|
+// } catch (Exception e) {
|
|
|
+// System.out.println("Error occurred: " + e);
|
|
|
+// }
|
|
|
+ log.info("正常执行----------------"+new Date());
|
|
|
}
|
|
|
|
|
|
private static void deleteObjectsAndEmptyDirectoriesRecursively(MinioClient minioClient, String bucketName, String prefix, ZonedDateTime deleteTime) throws Exception{
|