fix: 优化腾讯云账单同步限频
- 全局限制腾讯云API调用频率为每秒4次以内 - 对RequestLimitExceeded增加指数退避重试 - 补充限频回归测试并更新账单同步支持说明
This commit is contained in:
1 parent
7bc416d22a
commit
3a3f77ea62
5 files changed
+95
-7
No files matched your search
@@ -7,7 +7,6 @@ import (
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// FetchDailyBill 拉取指定日期的腾讯云日账单,并按产品和地域汇总。 // Logan.Li
|
||||
@@ -68,8 +67,6 @@ func (p *TencentProvider) FetchDailyBill(billingDate string) ([]CloudBillingReco
|
||||
if len(response.Response.DetailSet) < pageSize || (response.Response.Total > 0 && offset+pageSize >= response.Response.Total) {
|
||||
break
|
||||
}
|
||||
// 腾讯云账单接口频率上限为每秒 5 次,分页请求限速为每秒 4 次。 // Logan.Li
|
||||
time.Sleep(250 * time.Millisecond)
|
||||
}
|
||||
|
||||
keys := make([]aggregationKey, 0, len(aggregation))
|
||||
|
||||
Reference in new issue
Block a user