refactor: move can-scale check out to command

If the internals call ps-set-scale, we should always respect it.
This commit is contained in:
Jose Diaz-Gonzalez
2021-08-01 16:07:55 -04:00
parent 302537efd2
commit 247698fea6
2 changed files with 4 additions and 4 deletions

View File

@@ -381,10 +381,6 @@ func scaleReport(appName string) error {
}
func scaleSet(appName string, skipDeploy bool, processTuples []string) error {
if !canScaleApp(appName) {
return fmt.Errorf("App %s contains DOKKU_SCALE file and cannot be manually scaled", appName)
}
scale, err := parseProcessTuples(processTuples)
if err != nil {
return err

View File

@@ -134,6 +134,10 @@ func CommandScale(appName string, skipDeploy bool, processTuples []string) error
return scaleReport(appName)
}
if !canScaleApp(appName) {
return fmt.Errorf("App %s contains DOKKU_SCALE file and cannot be manually scaled", appName)
}
return scaleSet(appName, skipDeploy, processTuples)
}