fix(scheduler): убрать двойной SaveCheckRun (Checker персистит), SetDrift через CountDriftDomains, resolved после error
This commit is contained in:
@@ -258,6 +258,14 @@ func (s *Store) SetDomainStatus(ctx context.Context, domainID uuid.UUID, status
|
||||
return s.q.SetDomainStatus(ctx, db.SetDomainStatusParams{ID: domainID, LastCheckStatus: status})
|
||||
}
|
||||
|
||||
// CountDriftDomains returns the current number of domains system-wide whose
|
||||
// last check status is "drift". This is a global count (not per-project) —
|
||||
// it backs the dns_ar_drift_domains gauge, which is a system-level metric.
|
||||
func (s *Store) CountDriftDomains(ctx context.Context) (int, error) {
|
||||
n, err := s.q.CountDriftDomains(ctx)
|
||||
return int(n), err
|
||||
}
|
||||
|
||||
// User and Project are provider-neutral domain structs for the auth/tenant
|
||||
// layer (Фаза 2), mirroring the Account/Template/Domain wrappers above so
|
||||
// callers never need to import internal/store/db directly.
|
||||
|
||||
Reference in New Issue
Block a user