Skip to content

Commit

Permalink
rename job name
Browse files Browse the repository at this point in the history
Signed-off-by: Pravin Pushkar <[email protected]>
  • Loading branch information
pravinpushkar committed Aug 10, 2023
1 parent 759e46b commit 0cce83c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/standalone/stop_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
6 changes: 2 additions & 4 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0cce83c

Please sign in to comment.