Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/modules/eventprocessing/usecase/ingestion_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
var ErrInvalidStatsParam = errors.New("invalid ingestion-stats parameter")

const (
defaultStatsWindow = 24 * time.Hour
defaultStatsWindow = "24h"
defaultTop = 100
maxTop = 1000
)
Expand Down Expand Up @@ -132,7 +132,7 @@ func resolveStatus(status string) (string, string, error) {
// resolveWindow defaults to the last 24h when from/to are absent (RFC3339).
func resolveWindow(from, to string) (string, string) {
if to == "" { to = "now" }
if from == "" { from = "now-" + defaultStatsWindow.String() }
if from == "" { from = "now-" + defaultStatsWindow }
return from, to
}

Expand Down
Loading