Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
boufni95 committed Jan 9, 2025
1 parent 16d4198 commit df78bb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/services/metrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ export default class Handler {
past10m: { errors: 0, total: 0, from_unix: nowUnix - 60 * 10 },
past1m: { errors: 0, total: 0, from_unix: nowUnix - 60 },
}
if (last24h.length === 0) {
return stats
}
for (let i = last24h.length; i >= 0; i--) {
const e = last24h[i]
if (e.ts < stats.past24h.from_unix) {
Expand Down

0 comments on commit df78bb8

Please sign in to comment.