Fix parent process key an refactoring

This commit is contained in:
Vladimir Stoilov
2023-03-30 15:18:18 +02:00
parent 834282cb0e
commit 79d6bcb6c6
4 changed files with 27 additions and 21 deletions

View File

@@ -88,9 +88,9 @@ func GetSystemProcess(ctx context.Context) *Process {
}
func getSpecialProcess(ctx context.Context, template *Process) *Process {
p, _, _ := getSpecialProcessSingleInflight.Do(template.key, func() (interface{}, error) {
p, _, _ := getSpecialProcessSingleInflight.Do(template.processKey, func() (interface{}, error) {
// Check if we have already loaded the special process.
process, ok := GetProcessFromStorage(template.key)
process, ok := GetProcessFromStorage(template.processKey)
if ok {
return process, nil
}