From 173434ef342f1bbd8fec5c7c7c187459791bab48 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 29 Dec 2022 01:21:35 -0500 Subject: [PATCH] chore: reorder functions --- plugins/ps/functions.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/ps/functions.go b/plugins/ps/functions.go index 76297cb71..c13005cf1 100644 --- a/plugins/ps/functions.go +++ b/plugins/ps/functions.go @@ -70,6 +70,16 @@ func getProcfilePath(appName string) string { return filepath.Join(directory, "Procfile") } +func getProcessSpecificProcfilePath(appName string) string { + existingProcfile := getProcfilePath(appName) + processSpecificProcfile := fmt.Sprintf("%s.%s", existingProcfile, os.Getenv("DOKKU_PID")) + if common.FileExists(processSpecificProcfile) { + return processSpecificProcfile + } + + return existingProcfile +} + func getRestartPolicy(appName string) (string, error) { options, err := dockeroptions.GetDockerOptionsForPhase(appName, "deploy") if err != nil { @@ -275,16 +285,6 @@ func scaleSet(appName string, skipDeploy bool, clearExisting bool, processTuples return nil } -func getProcessSpecificProcfilePath(appName string) string { - existingProcfile := getProcfilePath(appName) - processSpecificProcfile := fmt.Sprintf("%s.%s", existingProcfile, os.Getenv("DOKKU_PID")) - if common.FileExists(processSpecificProcfile) { - return processSpecificProcfile - } - - return existingProcfile -} - func updateScale(appName string, clearExisting bool, formationUpdates FormationSlice) error { formations := FormationSlice{} if !clearExisting {