use cmd context instead of using context.Background()

This commit is contained in:
googs1025
2024-06-05 00:03:33 -04:00
committed by Amir Alavi
parent b1391edd2a
commit 8247f92fe0
+1 -1
View File
@@ -77,7 +77,7 @@ func NewDeschedulerCommand(out io.Writer) *cobra.Command {
secureServing.DisableHTTP2 = !s.EnableHTTP2
ctx, done := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
ctx, done := signal.NotifyContext(cmd.Context(), syscall.SIGINT, syscall.SIGTERM)
pathRecorderMux := mux.NewPathRecorderMux("descheduler")
if !s.DisableMetrics {