feat: allow specifying a single process type to restart
This changes restarts to drop the 'release' part that currently gets triggered, which also helps reduce the possibility that a new image layer will be added due to predeploy deploy triggers. Note that the old method essentially halfway-rebuilt the app (which was what added the extra layer). This refactor removes that, which is a bc-break. Additionally, scaling processes will result in deploying _only_ restarting the processes being scaled. Closes #2184
This commit is contained in:
@@ -54,8 +54,11 @@ func CommandReport(appName string, format string, infoFlag string) error {
|
||||
}
|
||||
|
||||
// CommandRestart restarts an app
|
||||
func CommandRestart(appName string, allApps bool, parallelCount int) error {
|
||||
func CommandRestart(appName string, processName string, allApps bool, parallelCount int) error {
|
||||
if allApps {
|
||||
if processName != "" {
|
||||
return errors.New("Unable to restart all apps when specifying a process name")
|
||||
}
|
||||
return common.RunCommandAgainstAllApps(Restart, "restart", parallelCount)
|
||||
}
|
||||
|
||||
@@ -63,6 +66,10 @@ func CommandRestart(appName string, allApps bool, parallelCount int) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if processName != "" {
|
||||
return RestartProcess(appName, processName)
|
||||
}
|
||||
|
||||
return Restart(appName)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user