Commit 395ab10c0c231c2cfac1a17e05b3cdbc4397278e
1 parent
87914be4
Avoid sending WARNINGS if api usage value is zero
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -181,7 +181,7 @@ public class TenantApiUsageState { | @@ -181,7 +181,7 @@ public class TenantApiUsageState { | ||
181 | long threshold = getProfileThreshold(recordKey); | 181 | long threshold = getProfileThreshold(recordKey); |
182 | long warnThreshold = getProfileWarnThreshold(recordKey); | 182 | long warnThreshold = getProfileWarnThreshold(recordKey); |
183 | ApiUsageStateValue tmpValue; | 183 | ApiUsageStateValue tmpValue; |
184 | - if (threshold == 0 || value < warnThreshold) { | 184 | + if (threshold == 0 || value == 0 || value < warnThreshold) { |
185 | tmpValue = ApiUsageStateValue.ENABLED; | 185 | tmpValue = ApiUsageStateValue.ENABLED; |
186 | } else if (value < threshold) { | 186 | } else if (value < threshold) { |
187 | tmpValue = ApiUsageStateValue.WARNING; | 187 | tmpValue = ApiUsageStateValue.WARNING; |