latest 버전 옵션을 프로세스 재시작시에도 적용
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user