|
|
@@ -101,21 +101,21 @@ public class PhotoAssetService {
|
|
|
photoAssetRepo.save(photoAsset);
|
|
|
}
|
|
|
|
|
|
- @Scheduled(fixedRate = 60000)
|
|
|
- @RedisLock(value = "autoPictureAudit", expire = 30, unit = TimeUnit.MINUTES)
|
|
|
- public void autoValidate() {
|
|
|
- if (generalProperties.isNotifyServer()) return;
|
|
|
- if (Arrays.asList(env.getActiveProfiles()).contains("dev")) {
|
|
|
- return;
|
|
|
- }
|
|
|
- try {
|
|
|
- List<PhotoAsset> list = photoAssetRepo
|
|
|
- .findAllByStatusAndOrderStatus(CollectionStatus.PENDING, OrderStatus.FINISH);
|
|
|
- list.parallelStream().forEach(this::imageAudit);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("批量图片审核出错", e);
|
|
|
- }
|
|
|
- }
|
|
|
+// @Scheduled(fixedRate = 60000)
|
|
|
+// @RedisLock(value = "autoPictureAudit", expire = 30, unit = TimeUnit.MINUTES)
|
|
|
+// public void autoValidate() {
|
|
|
+// if (generalProperties.isNotifyServer()) return;
|
|
|
+// if (Arrays.asList(env.getActiveProfiles()).contains("dev")) {
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// try {
|
|
|
+// List<PhotoAsset> list = photoAssetRepo
|
|
|
+// .findAllByStatusAndOrderStatus(CollectionStatus.PENDING, OrderStatus.FINISH);
|
|
|
+// list.parallelStream().forEach(this::imageAudit);
|
|
|
+// } catch (Exception e) {
|
|
|
+// log.error("批量图片审核出错", e);
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
public void imageAudit(PhotoAsset photoAsset) {
|
|
|
boolean result = contentAuditService.auditImage(photoAsset.getPic().getUrl());
|