refactor(db): thread context.Context through all Store methods
Enables request-scoped cancellation, timeouts, and graceful shutdown for all database operations across API handlers, CLI commands, and TUI.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package tui
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -1095,7 +1096,7 @@ func (m model) reloadDetail(id string) tea.Cmd {
|
||||
return tea.Batch(
|
||||
loadEntities(m.store, m.listParams()),
|
||||
func() tea.Msg {
|
||||
e, err := m.store.Get(id)
|
||||
e, err := m.store.Get(context.Background(), id)
|
||||
if err != nil {
|
||||
return errMsg{err}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user