Skip to content

Commit

Permalink
Update allowed delay for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed Oct 21, 2024
1 parent 8333a45 commit 0c862c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/MetricsWarning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import Message from './Message'

import { timestampToDate } from '../core/helper'

const FOUR_HOURS_IN_SECONDS = 4 * 60 * 60
const MAX_DELAY_SECONDS = 48 * 60 * 60

export default function MetricsWarning(props: { metrics: types.IMetrics | null }) {
if (!props.metrics || Date.now() / 1000 - props.metrics.last_updated < FOUR_HOURS_IN_SECONDS)
if (!props.metrics || Date.now() / 1000 - props.metrics.last_updated < MAX_DELAY_SECONDS)
return
return (
<Container maxWidth="md">
Expand Down

0 comments on commit 0c862c2

Please sign in to comment.