Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only stopped process or failed process allow run start 是不是应该在loadFirst判断,而不是restart #22

Open
BillXiang opened this issue Jul 22, 2024 · 0 comments

Comments

@BillXiang
Copy link

BillXiang commented Jul 22, 2024

client/cmd/exec/restart.go

func restart(m *model.Process, flags string) ([]string, error) {
	// only stopped process or failed process allow run start
	if m.Status == model.StatusStopped || m.Status == model.StatusFailed {
		newData, err := reloadProcess(m, flags)
		if err != nil {
			return nil, err
		}

		return newData, nil
	}

	return nil, fmt.Errorf("the process already start")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant