fix: address maintainer review for #169

This commit is contained in:
n30nex authored and MrAlders0n committed 2026-09-30 07:19:02 -04:00
1 parent 5977e42c5c
commit d3c330e8fb
17 files changed
+183 -360

No files matched your search

+3
View File
@@ -373,6 +373,9 @@ func (cr *CachedReader) GetObserverTelemetryBucketed(ctx context.Context, observ
// GetObserverActivity implements [api.Reader].
func (cr *CachedReader) GetObserverActivity(ctx context.Context, observerID uuid.UUID, window, interval time.Duration, until time.Time) (*api.ObserverActivity, error) {
if !until.IsZero() {
until = until.UTC().Truncate(interval)
}
key := keyObserverActivityPrefix + observerID.String() + ":" + window.String() + ":" + interval.String() + ":" + until.UTC().Format(time.RFC3339Nano)
return getOrSet(ctx, cr.c, key, observerActivityTTL, func() (*api.ObserverActivity, error) {
return cr.inner.GetObserverActivity(ctx, observerID, window, interval, until)