- ebai限访问频率按门店来
This commit is contained in:
@@ -26,7 +26,7 @@ func TestLimitSpeed(t *testing.T) {
|
||||
utils.CallFuncAsync(func() {
|
||||
count := 0
|
||||
for {
|
||||
limiter.AccessAPI("limited1persecond")
|
||||
limiter.AccessAPI("limited1persecond", "")
|
||||
fmt.Printf("limited1persecond, time:%s, count:%d\n", time.Now().Format("2006-01-02 15:04:05.00000"), count)
|
||||
count++
|
||||
}
|
||||
@@ -34,7 +34,7 @@ func TestLimitSpeed(t *testing.T) {
|
||||
utils.CallFuncAsync(func() {
|
||||
count := 0
|
||||
for {
|
||||
limiter.AccessAPI("limited10per10second")
|
||||
limiter.AccessAPI("limited10per10second", "")
|
||||
fmt.Printf("limited10per10second, time:%s, count:%d\n", time.Now().Format("2006-01-02 15:04:05.00000"), count)
|
||||
count++
|
||||
}
|
||||
@@ -42,7 +42,7 @@ func TestLimitSpeed(t *testing.T) {
|
||||
utils.CallFuncAsync(func() {
|
||||
count := 0
|
||||
for {
|
||||
limiter.AccessAPI("otherAPI")
|
||||
limiter.AccessAPI("otherAPI", "")
|
||||
fmt.Printf("otherAPI, time:%s, count:%d\n", time.Now().Format("2006-01-02 15:04:05.00000"), count)
|
||||
count++
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user