Skip to content

Commit a216f42

Browse files
fix: update tier limits (#245)
* fix: update tier limits * fix(limits): update test to match tier config values
1 parent c3b9f90 commit a216f42

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

limits/config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ agents:
99
# Each tier defines the maximum number of requests per IP per integration
1010
# within the specified interval. Tier 0 is the default for registered integrations.
1111
tiers:
12+
# The default tier (0) has the same limit as the non-registered integrations.
1213
0:
13-
interval: 1h
14-
max_events: 100
14+
interval: 12h
15+
max_events: 40
1516
1:
1617
interval: 1h
17-
max_events: 500
18+
max_events: 50
1819
2:
1920
interval: 1h
20-
max_events: 1000
21+
max_events: 100
2122
3:
2223
interval: 1h
23-
max_events: 5000
24+
max_events: 200

limits/config_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ func TestParseFullConfig(t *testing.T) {
2121
"node-fetch/1.0 (+https://github.com/bitinn/node-fetch)": NewCron("7,8 0,15,30,45 * * * * *", time.Minute),
2222
},
2323
wantTiers: TierLimits{
24-
0: LimitConfig{Interval: time.Hour, MaxEvents: 100},
25-
1: LimitConfig{Interval: time.Hour, MaxEvents: 500},
26-
2: LimitConfig{Interval: time.Hour, MaxEvents: 1000},
27-
3: LimitConfig{Interval: time.Hour, MaxEvents: 5000},
24+
0: LimitConfig{Interval: 12 * time.Hour, MaxEvents: 40},
25+
1: LimitConfig{Interval: time.Hour, MaxEvents: 50},
26+
2: LimitConfig{Interval: time.Hour, MaxEvents: 100},
27+
3: LimitConfig{Interval: time.Hour, MaxEvents: 200},
2828
},
2929
wantErr: false,
3030
},

0 commit comments

Comments
 (0)