Skip to content

Commit 81c1762

Browse files
syzhyugasun
authored andcommitted
fix: change time range gt 3day period 3600s
1 parent bf59cb9 commit 81c1762

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/client.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,13 @@ class SlsMonitor {
596596

597597
const metrics = ['Invocation', 'Error', 'Duration']
598598

599-
const reqPeriod = 60
599+
const diffDay =
600+
(new Date(rangeTime.rangeEnd) - new Date(rangeTime.rangeStart)) / 1000 / 3600 / 24
601+
let reqPeriod = 60
602+
// cloud api limit
603+
if (diffDay >= 3) {
604+
reqPeriod = 3600
605+
}
600606
const requestHandlers = []
601607
for (var i = 0; i < metrics.length; i++) {
602608
req.Namespace = 'qce/scf_v2'

0 commit comments

Comments
 (0)