Skip to content

Commit

Permalink
check <= 0 instead of ===
Browse files Browse the repository at this point in the history
  • Loading branch information
malteish committed Sep 24, 2024
1 parent d4d4293 commit 83eaa47
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function countMessage(redis: Redis) {
messageSizeBytes: number,
deliveryServiceProperties: DeliveryServiceProperties,
) => {
if (deliveryServiceProperties.metricsRetentionDurationInSeconds === 0) {
if (deliveryServiceProperties.metricsRetentionDurationInSeconds <= 0) {
// Metrics are disabled
return;
}
Expand Down Expand Up @@ -48,7 +48,7 @@ export function countMessage(redis: Redis) {

export function countNotification(redis: Redis) {
return async (deliveryServiceProperties: DeliveryServiceProperties) => {
if (deliveryServiceProperties.metricsRetentionDurationInSeconds === 0) {
if (deliveryServiceProperties.metricsRetentionDurationInSeconds <= 0) {
// Metrics are disabled
return;
}
Expand Down

0 comments on commit 83eaa47

Please sign in to comment.