From 2a4f9f15b6875bea26b6a167ff7dbcf098b45be4 Mon Sep 17 00:00:00 2001 From: Aleksei Pleshakov Date: Mon, 16 Dec 2024 18:13:50 +0100 Subject: [PATCH] select RPO from db to report metrics --- internal/watchers/schedule_watcher/schedule_watcher.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/watchers/schedule_watcher/schedule_watcher.go b/internal/watchers/schedule_watcher/schedule_watcher.go index b659a1b2..b1019cfe 100644 --- a/internal/watchers/schedule_watcher/schedule_watcher.go +++ b/internal/watchers/schedule_watcher/schedule_watcher.go @@ -46,10 +46,10 @@ func ScheduleWatcherAction( ctx, cancel := context.WithTimeout(baseCtx, period) defer cancel() - schedules, err := db.SelectBackupSchedules( - //WithRPOInfo + //TODO: add pagination or switch to Query.Client() + schedules, err := db.SelectBackupSchedulesWithRPOInfo( ctx, queries.NewReadTableQuery( - queries.WithTableName("BackupSchedules"), + queries.WithRawQuery(queries.ListSchedulesQuery), queries.WithQueryFilters( queries.QueryFilter{ Field: "status",