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:
@@ -381,10 +381,6 @@ func scaleReport(appName string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func scaleSet(appName string, skipDeploy bool, processTuples []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)
|
scale, err := parseProcessTuples(processTuples)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -134,6 +134,10 @@ func CommandScale(appName string, skipDeploy bool, processTuples []string) error
|
|||||||
return scaleReport(appName)
|
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)
|
return scaleSet(appName, skipDeploy, processTuples)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user