latest 버전 옵션을 프로세스 재시작시에도 적용

This commit is contained in:
2024-09-27 15:26:51 +09:00
parent e9370513c2
commit 7fe5090efa
2 changed files with 29 additions and 22 deletions

View File

@ -91,16 +91,17 @@ type HoustonClient interface {
var seq = int32(1)
type procmeta struct {
id int32
cmd *exec.Cmd
name string
args []string
version string
verpath string
recover bool
state int32
stdin io.WriteCloser
logfile string
id int32
cmd *exec.Cmd
name string
args []string
version string
verpath string
recover bool
state int32
stdin io.WriteCloser
logfile string
keepLatest bool
}
func (pm *procmeta) isState(s protos.ProcessState) bool {
@ -362,6 +363,10 @@ func NewClient(standalone bool) (HoustonClient, error) {
proc.cmd.Process.Release()
if proc.isState(protos.ProcessState_Restart) {
if proc.keepLatest {
proc.version = "latest"
}
if err := hc.startChildProcess(&shared.StartProcessRequest{
Version: proc.version,
Name: proc.name,