From 0cce83cadedb5b4d243367b4a99ff4c07eec5f4f Mon Sep 17 00:00:00 2001 From: Pravin Pushkar Date: Wed, 9 Aug 2023 11:27:13 +0530 Subject: [PATCH] rename job name Signed-off-by: Pravin Pushkar --- cmd/run.go | 2 +- pkg/standalone/stop_windows.go | 2 +- utils/utils.go | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmd/run.go b/cmd/run.go index 80ff5d023..c58ade3f0 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -559,7 +559,7 @@ func executeRun(runTemplateName, runFilePath string, apps []runfileconfig.App) ( if runState.AppCMD.Command.Process != nil { putAppProcessIDInMeta(runState) // Attach a job object to the app process. - daprsyscall.AttachJobObjectToProcess(strconv.Itoa(os.Getpid())+"-"+utils.WindowsDaprdAppProcJobName, runState.AppCMD.Command.Process) + daprsyscall.AttachJobObjectToProcess(strconv.Itoa(os.Getpid())+"-"+utils.WindowsDaprAppProcJobName, runState.AppCMD.Command.Process) } } diff --git a/pkg/standalone/stop_windows.go b/pkg/standalone/stop_windows.go index b4d2337c7..6b3a0ef2d 100644 --- a/pkg/standalone/stop_windows.go +++ b/pkg/standalone/stop_windows.go @@ -49,7 +49,7 @@ func StopAppsWithRunFile(runTemplatePath string) error { } func disposeJobHandle(cliPID int) error { - jbobj, err := winjob.Open(strconv.Itoa(cliPID) + "-" + utils.WindowsDaprdAppProcJobName) + jbobj, err := winjob.Open(strconv.Itoa(cliPID) + "-" + utils.WindowsDaprAppProcJobName) if err != nil { return fmt.Errorf("error opening job object: %w", err) } diff --git a/utils/utils.go b/utils/utils.go index 9fc77dfd2..f7f383e82 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -52,10 +52,8 @@ const ( // DefaultAppChannelAddress is the default local network address that user application listen on. DefaultAppChannelAddress = "127.0.0.1" - // WindowsDaprdAppProcJobName is the name of the Windows job object that is used to manage the Dapr processes on windows. - WindowsDaprdAppProcJobName = "daprd-app-process-job" - // WindowsCLIProcessJobName is the name of the Windows job object that is used to manage the Dapr CLI processes on windows. - WindowsCLIProcessJobName = "dapr-cli-process-job" + // WindowsDaprAppProcJobName is the name of the Windows job object that is used to manage the Daprized app's processes on windows. + WindowsDaprAppProcJobName = "dapr-app-process-job" ) // IsValidContainerRuntime checks if the input is a valid container runtime.