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:
2026-05-20 20:51:51 -04:00
parent 50b80f4407
commit d715b053e7
18 changed files with 267 additions and 228 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ func init() {
rootCmd.AddCommand(cardsCmd)
}
func runCards(_ *cobra.Command, _ []string) error {
func runCards(cmd *cobra.Command, _ []string) error {
store, err := openStore()
if err != nil {
return err
@@ -49,7 +49,7 @@ func runCards(_ *cobra.Command, _ []string) error {
p.CardTypeFilter = &ct
}
entities, err := store.List(p)
entities, err := store.List(cmd.Context(), p)
if err != nil {
return err
}