refactor: rename pre-restore trigger to scheduler-pre-restore
This better reflects what the trigger does, and allows us to use the pre-restore trigger at the beginning of the ps:restore command.
This commit is contained in:
@@ -115,8 +115,8 @@ func RestartProcess(appName string, processName string) error {
|
||||
// Restore ensures an app that should be running is running on boot
|
||||
func Restore(appName string) error {
|
||||
scheduler := common.GetAppScheduler(appName)
|
||||
if err := common.PlugnTrigger("pre-restore", []string{scheduler, appName}...); err != nil {
|
||||
return fmt.Errorf("Error running pre-restore: %s", err)
|
||||
if err := common.PlugnTrigger("scheduler-pre-restore", []string{scheduler, appName}...); err != nil {
|
||||
return fmt.Errorf("Error running scheduler-pre-restore: %s", err)
|
||||
}
|
||||
|
||||
common.LogInfo1("Clearing potentially invalid proxy configuration")
|
||||
|
||||
@@ -74,6 +74,10 @@ func CommandRestart(appName string, processName string, allApps bool, parallelCo
|
||||
|
||||
// CommandRestore starts previously running apps e.g. after reboot
|
||||
func CommandRestore(appName string, allApps bool, parallelCount int) error {
|
||||
if err := common.PlugnTrigger("pre-restore", []string{}...); err != nil {
|
||||
return fmt.Errorf("Error running pre-restore: %s", err)
|
||||
}
|
||||
|
||||
if allApps {
|
||||
if err := restorePrep(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user