(ctx context.Context, tx *sql.Tx, workspace string, activeWindow time.Duration)
| 133 | } |
| 134 | |
| 135 | func countActiveVCSProviderUsersTx(ctx context.Context, tx *sql.Tx, workspace string, activeWindow time.Duration) (int, error) { |
| 136 | var count int |
| 137 | if err := tx.QueryRowContext(ctx, countActiveVCSProviderUsersSQL, workspace, activeWindow.Seconds()).Scan(&count); err != nil { |
| 138 | return 0, errors.Wrapf(err, "failed to count active VCS provider users") |
| 139 | } |
| 140 | return count, nil |
| 141 | } |
| 142 | |
| 143 | // DeleteExpiredVCSProviderUsers deletes VCS provider users older than the active window. |
| 144 | func (s *Store) DeleteExpiredVCSProviderUsers(ctx context.Context, activeWindow time.Duration) (int64, error) { |
no test coverage detected