From d6d8486d8ef9368b824ab1b81b7d0db655f13882 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Thu, 10 Oct 2024 12:17:21 +1000 Subject: [PATCH] fix: Update disk usage interval to 60 minutes --- example_config.yaml | 2 +- pkg/exporter/config.go | 9 ++++++++- pkg/exporter/exporter.go | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/example_config.yaml b/example_config.yaml index 57d37da..87d496c 100644 --- a/example_config.yaml +++ b/example_config.yaml @@ -13,6 +13,6 @@ execution: - "txpool" diskUsage: enabled: false - interval: 30m + interval: 60m directories: - /data/ethereum \ No newline at end of file diff --git a/pkg/exporter/config.go b/pkg/exporter/config.go index e3a923c..0109b3e 100644 --- a/pkg/exporter/config.go +++ b/pkg/exporter/config.go @@ -1,6 +1,10 @@ package exporter -import "github.com/ethpandaops/beacon/pkg/human" +import ( + "time" + + "github.com/ethpandaops/beacon/pkg/human" +) // Config holds the configuration for the ethereum sync status tool. type Config struct { @@ -58,6 +62,9 @@ func DefaultConfig() *Config { DiskUsage: DiskUsage{ Enabled: false, Directories: []string{}, + Interval: human.Duration{ + Duration: 60 * time.Minute, + }, }, Pair: PairConfig{ Enabled: true, diff --git a/pkg/exporter/exporter.go b/pkg/exporter/exporter.go index b45437b..1536b1f 100644 --- a/pkg/exporter/exporter.go +++ b/pkg/exporter/exporter.go @@ -77,7 +77,7 @@ func (e *exporter) Init(ctx context.Context) error { interval := e.config.DiskUsage.Interval.Duration if interval == 0 { - interval = 30 * time.Minute + interval = 60 * time.Minute } diskUsage, err := disk.NewUsage(