retry机制

This commit is contained in:
lxu75
2025-05-20 18:56:48 +08:00
parent e090a1e82f
commit 6016288fd3

View File

@@ -13,6 +13,8 @@ import com.volvo.ai.analytic.center.utils.AiAnalysisUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import java.util.HashMap;
@@ -49,6 +51,7 @@ public class DiFyServiceImpl implements DiFyService{
}
@Override
@Retryable(maxAttempts = 1, backoff = @Backoff(delay = 1000))
public Object getDiFyObjectRetry(DiFyReq diFyReq) {
Map<String, Object> map = new HashMap<>();
map.put("inputs",diFyReq.getInputs());