解决同步容器问题

develop
tanshaolong 2024-09-05 16:38:42 +08:00
parent 7bce87c19f
commit ffc9c77053
3 changed files with 3 additions and 8 deletions

View File

@ -56,7 +56,7 @@ public class TianYiContainerClusterProvider extends TianyiProvider {
pageNow++;
Integer current = returnObj.getInteger("current");
Integer pages = returnObj.getInteger("pages");
if (current == pages) {
if (pages == 0 || current == pages) {
break;
}
}

View File

@ -109,7 +109,7 @@ public class TianYiContainerNodeProvider extends TianyiProvider {
pageNow++;
Integer current = returnObj.getInteger("current");
Integer pages = returnObj.getInteger("pages");
if (current == pages) {
if (pages == 0 || current == pages) {
break;
}
}

View File

@ -37,9 +37,6 @@ public class TyHttpUtils {
headersOfAuth.put("hybrid-date", hybridDate);
String requestId = UUID.randomUUID().toString().replace("-", "");
headersOfAuth.put("ctyun-hybrid-request-id", requestId);
logger.info("----------------------------------------------------------");
logger.info(requestId);
logger.info("----------------------------------------------------------");
String forSignature = forSignature(method, headersOfAuth, params);
byte[] kdate = kdate(hybridDate, accessKey, secretKey);
byte[] signatureBytes = HmacSHA256Util.hmacSHA256(forSignature.getBytes(StandardCharsets.UTF_8), kdate);
@ -52,9 +49,7 @@ public class TyHttpUtils {
newHeaders.put("Content-Type", "application/json");
newHeaders.put("hybrid-date", hybridDate);
newHeaders.put("ctyun-hybrid-request-id", requestId);
logger.info("----------------------------------------------------------");
logger.info(requestId);
logger.info("----------------------------------------------------------");
logger.info("The requestId of Tianyi cloud is " + requestId);
newHeaders.put("Hybrid-Authorization", authorization);
newHeaders.put("ctUserId", ctUserId);