xiongzhu 4 лет назад
Родитель
Сommit
f51d92cb61

+ 1 - 0
src/main/java/com/izouma/nineth/service/AssetMintService.java

@@ -22,6 +22,7 @@ import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import java.io.File;
 import java.io.File;
+import java.util.concurrent.LinkedBlockingQueue;
 
 
 @Service
 @Service
 @Slf4j
 @Slf4j

+ 2 - 2
src/main/java/com/izouma/nineth/service/NFTService.java

@@ -59,8 +59,8 @@ public class NFTService {
         }
         }
     }
     }
 
 
-    @Retryable(maxAttempts = 10, backoff = @Backoff(delay = 5000), value = BusinessException.class)
-    public NFT createToken(String toAccount) throws Exception {
+    @Retryable(maxAttempts = 100, backoff = @Backoff(delay = 5000), value = BusinessException.class)
+    public synchronized NFT createToken(String toAccount) throws Exception {
         JSONArray jsonArray = new JSONArray();
         JSONArray jsonArray = new JSONArray();
         jsonArray.add(Utils.getIdentityByName(toAccount));
         jsonArray.add(Utils.getIdentityByName(toAccount));
         CallRestBizParam callRestBizParam = CallRestBizParam.builder()
         CallRestBizParam callRestBizParam = CallRestBizParam.builder()