解决同步容器问题
parent
7bce87c19f
commit
ffc9c77053
|
@ -56,7 +56,7 @@ public class TianYiContainerClusterProvider extends TianyiProvider {
|
||||||
pageNow++;
|
pageNow++;
|
||||||
Integer current = returnObj.getInteger("current");
|
Integer current = returnObj.getInteger("current");
|
||||||
Integer pages = returnObj.getInteger("pages");
|
Integer pages = returnObj.getInteger("pages");
|
||||||
if (current == pages) {
|
if (pages == 0 || current == pages) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class TianYiContainerNodeProvider extends TianyiProvider {
|
||||||
pageNow++;
|
pageNow++;
|
||||||
Integer current = returnObj.getInteger("current");
|
Integer current = returnObj.getInteger("current");
|
||||||
Integer pages = returnObj.getInteger("pages");
|
Integer pages = returnObj.getInteger("pages");
|
||||||
if (current == pages) {
|
if (pages == 0 || current == pages) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,9 +37,6 @@ public class TyHttpUtils {
|
||||||
headersOfAuth.put("hybrid-date", hybridDate);
|
headersOfAuth.put("hybrid-date", hybridDate);
|
||||||
String requestId = UUID.randomUUID().toString().replace("-", "");
|
String requestId = UUID.randomUUID().toString().replace("-", "");
|
||||||
headersOfAuth.put("ctyun-hybrid-request-id", requestId);
|
headersOfAuth.put("ctyun-hybrid-request-id", requestId);
|
||||||
logger.info("----------------------------------------------------------");
|
|
||||||
logger.info(requestId);
|
|
||||||
logger.info("----------------------------------------------------------");
|
|
||||||
String forSignature = forSignature(method, headersOfAuth, params);
|
String forSignature = forSignature(method, headersOfAuth, params);
|
||||||
byte[] kdate = kdate(hybridDate, accessKey, secretKey);
|
byte[] kdate = kdate(hybridDate, accessKey, secretKey);
|
||||||
byte[] signatureBytes = HmacSHA256Util.hmacSHA256(forSignature.getBytes(StandardCharsets.UTF_8), kdate);
|
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("Content-Type", "application/json");
|
||||||
newHeaders.put("hybrid-date", hybridDate);
|
newHeaders.put("hybrid-date", hybridDate);
|
||||||
newHeaders.put("ctyun-hybrid-request-id", requestId);
|
newHeaders.put("ctyun-hybrid-request-id", requestId);
|
||||||
logger.info("----------------------------------------------------------");
|
logger.info("The requestId of Tianyi cloud is " + requestId);
|
||||||
logger.info(requestId);
|
|
||||||
logger.info("----------------------------------------------------------");
|
|
||||||
newHeaders.put("Hybrid-Authorization", authorization);
|
newHeaders.put("Hybrid-Authorization", authorization);
|
||||||
newHeaders.put("ctUserId", ctUserId);
|
newHeaders.put("ctUserId", ctUserId);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue