mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-10-22 22:21:27 +00:00
fix(observers): separate packet metrics from presence updates
This commit is contained in:
1 parent
fd7c6b3eb7
commit
5fbba24a4a
31 files changed
+844
-93
No files matched your search
Vendored
+3
-3
@@ -372,10 +372,10 @@ 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) (*api.ObserverActivity, error) {
|
||||
key := keyObserverActivityPrefix + observerID.String() + ":" + window.String() + ":" + interval.String()
|
||||
func (cr *CachedReader) GetObserverActivity(ctx context.Context, observerID uuid.UUID, window, interval time.Duration, until time.Time) (*api.ObserverActivity, error) {
|
||||
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)
|
||||
return cr.inner.GetObserverActivity(ctx, observerID, window, interval, until)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user