- Implements bd stale command to show issues with execution_state where executor is dead/stopped - Adds --release flag to automatically release orphaned issues - Adds --threshold flag to customize heartbeat staleness threshold (default: 300s/5min) - Handles missing executor instances (LEFT JOIN) for cases where executor was deleted - Adds QueryContext and BeginTx helper methods to SQLiteStorage for advanced queries - Fixes ExternalRef comparison bug in import_shared.go (pointer vs string) - Removes unused imports in import.go Resolves vc-124
19 lines
611 B
Go
19 lines
611 B
Go
package sqlite
|
|
|
|
import (
|
|
"context"
|
|
"database/sql"
|
|
)
|
|
|
|
// QueryContext exposes the underlying database QueryContext method for advanced queries
|
|
// This is used by commands that need direct SQL access (e.g., bd stale)
|
|
func (s *SQLiteStorage) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) {
|
|
return s.db.QueryContext(ctx, query, args...)
|
|
}
|
|
|
|
// BeginTx starts a new database transaction
|
|
// This is used by commands that need to perform multiple operations atomically
|
|
func (s *SQLiteStorage) BeginTx(ctx context.Context) (*sql.Tx, error) {
|
|
return s.db.BeginTx(ctx, nil)
|
|
}
|