- ebai限访问频率按门店来

This commit is contained in:
gazebo
2019-04-10 14:31:38 +08:00
parent df987cd93e
commit 9fd70a7446
4 changed files with 89 additions and 31 deletions

View File

@@ -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++
}