You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[error("User ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage.", uuid = user.uuid)]
31
+
User{
32
+
user:QueryUser,
33
+
resource:BencherResource,
34
+
rate_limit:u32,
35
+
},
36
+
#[error("Organization ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage.", uuid = organization.uuid)]
37
+
Organization{
38
+
organization:QueryOrganization,
39
+
resource:BencherResource,
40
+
rate_limit:u32,
41
+
},
42
+
#[error("Unclaimed project ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage or claim the project: https://bencher.dev/auth/signup?claim={uuid}", uuid = project.uuid)]
43
+
UnclaimedProject{
44
+
project:QueryProject,
45
+
resource:BencherResource,
46
+
rate_limit:u32,
47
+
},
48
+
#[error("Claimed project ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage.", uuid = project.uuid)]
49
+
ClaimedProject{
50
+
project:QueryProject,
51
+
resource:BencherResource,
52
+
rate_limit:u32,
53
+
},
54
+
#[error("Branch ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage.", uuid = branch.uuid)]
55
+
Branch{
56
+
branch:QueryBranch,
57
+
resource:BencherResource,
58
+
rate_limit:u32,
59
+
},
60
+
#[error("Threshold ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage.", uuid = threshold.uuid)]
slog::warn!(log,"Custom rate limits are set, but there is no valid Bencher Plus license key! This is a violation of the Bencher License: https://bencher.dev/legal/license");
109
+
slog::warn!(
110
+
log,
111
+
"Please purchase a license key: https://bencher.dev/pricing"
112
+
);
113
+
},
114
+
Ok(_) => {},
115
+
Err(e) => {
116
+
slog::error!(log,"Failed to check license for custom rate limits: {e}");
#[error("User ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage.", uuid = user.uuid)]
13
-
User{
14
-
user:QueryUser,
15
-
resource:BencherResource,
16
-
rate_limit:u32,
17
-
},
18
-
#[error("Organization ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage.", uuid = organization.uuid)]
19
-
Organization{
20
-
organization:QueryOrganization,
21
-
resource:BencherResource,
22
-
rate_limit:u32,
23
-
},
24
-
#[error("Unclaimed project ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage or claim the project: https://bencher.dev/auth/signup?claim={uuid}", uuid = project.uuid)]
25
-
UnclaimedProject{
26
-
project:QueryProject,
27
-
resource:BencherResource,
28
-
rate_limit:u32,
29
-
},
30
-
#[error("Claimed project ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage.", uuid = project.uuid)]
31
-
ClaimedProject{
32
-
project:QueryProject,
33
-
resource:BencherResource,
34
-
rate_limit:u32,
35
-
},
36
-
#[error("Branch ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage.", uuid = branch.uuid)]
37
-
Branch{
38
-
branch:QueryBranch,
39
-
resource:BencherResource,
40
-
rate_limit:u32,
41
-
},
42
-
#[error("Threshold ({uuid}) has exceeded the daily rate limit ({rate_limit}) for {resource} creation. Please, reduce your daily usage.", uuid = threshold.uuid)]
43
-
Threshold{
44
-
threshold:QueryThreshold,
45
-
resource:BencherResource,
46
-
rate_limit:u32,
47
-
},
48
-
}
49
-
50
1
#[macro_export]
51
2
macro_rules! fn_rate_limit {
52
3
($table:ident, $resource:ident) => {
@@ -80,7 +31,7 @@ macro_rules! fn_rate_limit {
80
31
if creation_count >= context.rate_limit.unclaimed =>
0 commit comments