From 670e679a09e35665bf41c91270a5e9301f54d21f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 3 Feb 2021 03:49:44 -0500 Subject: [PATCH] refactor: do not attempt to extract Procfile in ps:scale The Procfile is now extracted in the pre-deploy step for every deploy and otherwise not removed. Thus, it should always exist when necessary - web will be scale to 1 automatically and it won't need to be present on future ps:scale calls since we'll have the scale file - and the command can execute faster. --- plugins/ps/.gitignore | 1 + plugins/ps/subcommands.go | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/plugins/ps/.gitignore b/plugins/ps/.gitignore index 3922c71ac..528524b69 100644 --- a/plugins/ps/.gitignore +++ b/plugins/ps/.gitignore @@ -9,3 +9,4 @@ /pre-* /procfile-* /app-restart +/core-post-deploy diff --git a/plugins/ps/subcommands.go b/plugins/ps/subcommands.go index 16835c90f..9c675f872 100644 --- a/plugins/ps/subcommands.go +++ b/plugins/ps/subcommands.go @@ -121,21 +121,6 @@ func CommandScale(appName string, skipDeploy bool, processTuples []string) error } procfilePath := getProcfilePath(appName) - if !common.FileExists(procfilePath) { - extract := func() error { - image, err := common.GetDeployingAppImageName(appName, "", "") - if err != nil { - return nil - } - - return extractProcfile(appName, image) - } - - if err := common.SuppressOutput(extract); err != nil { - return err - } - } - if !hasScaleFile(appName) || common.FileExists(procfilePath) { update := func() error { return updateScalefile(appName, make(map[string]int))