|
@@ -1,8 +1,11 @@
|
|
|
package com.fdkankan.scene.controller;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
+import cn.hutool.core.date.TimeInterval;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -16,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
* @author dengsixing
|
|
|
* @since 2022/8/17
|
|
|
**/
|
|
|
+@Slf4j
|
|
|
@RestController
|
|
|
@RequestMapping("/test")
|
|
|
public class TestController {
|
|
@@ -26,8 +30,15 @@ public class TestController {
|
|
|
private FYunFileServiceInterface fYunFileService;
|
|
|
|
|
|
@GetMapping("/test")
|
|
|
- public ResultData test(){
|
|
|
- return ResultData.ok(fYunFileService.fileExist("scene_result_data/KK-t-JCaoqtvy7AO/caches/images"));
|
|
|
+ public ResultData<Void> test(){
|
|
|
+ TimeInterval timer = DateUtil.timer();
|
|
|
+ fYunFileService.deleteFolder("test001/hotspot");
|
|
|
+ long l = timer.intervalRestart();
|
|
|
+ log.info("删除文件花费时间:{}", l);
|
|
|
+ fYunFileService.copyFileInBucketParallel("test/hotspot", "test001/hotspot");
|
|
|
+ long l2 = timer.intervalRestart();
|
|
|
+ log.info("删除文件花费时间:{}", l2);
|
|
|
+ return ResultData.ok();
|
|
|
}
|
|
|
|
|
|
}
|