chore: reorder functions

This commit is contained in:
Jose Diaz-Gonzalez
2022-12-29 01:21:35 -05:00
parent 3f82c525ad
commit 173434ef34

View File

@@ -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 {