bd sync: 2025-12-23 23:38:57

This commit is contained in:
Steve Yegge
2025-12-23 23:38:57 -08:00
parent 05e10b6759
commit e67f27c092
80 changed files with 7165 additions and 8490 deletions

View File

@@ -246,3 +246,22 @@ func (s *SQLiteStorage) rebuildBlockedCache(ctx context.Context, exec execer) er
func (s *SQLiteStorage) invalidateBlockedCache(ctx context.Context, exec execer) error {
return s.rebuildBlockedCache(ctx, exec)
}
// GetBlockedIssueIDs returns all issue IDs currently in the blocked cache
func (s *SQLiteStorage) GetBlockedIssueIDs(ctx context.Context) ([]string, error) {
rows, err := s.db.QueryContext(ctx, "SELECT issue_id FROM blocked_issues_cache")
if err != nil {
return nil, fmt.Errorf("failed to query blocked_issues_cache: %w", err)
}
defer rows.Close()
var ids []string
for rows.Next() {
var id string
if err := rows.Scan(&id); err != nil {
return nil, fmt.Errorf("failed to scan blocked issue ID: %w", err)
}
ids = append(ids, id)
}
return ids, rows.Err()
}