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:
@@ -36,7 +36,7 @@ func init() {
|
||||
lsCmd.Flags().BoolVar(&lsAll, "all", false, "include deleted entities")
|
||||
}
|
||||
|
||||
func runLs(_ *cobra.Command, _ []string) error {
|
||||
func runLs(cmd *cobra.Command, _ []string) error {
|
||||
store, err := openStore()
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -88,7 +88,7 @@ func runLs(_ *cobra.Command, _ []string) error {
|
||||
p.Since = &since
|
||||
}
|
||||
|
||||
entities, err := store.List(p)
|
||||
entities, err := store.List(cmd.Context(), p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user