버전 비교 로직 제거
This commit is contained in:
@ -389,16 +389,6 @@ func (hc *houstonClient) launch(meta *procmeta) error {
|
||||
var errPrepareprocessLaunchFailed = errors.New("prepareProcessLaunch failed")
|
||||
|
||||
func (hc *houstonClient) startChildProcess(req *shared.StartProcessRequest, op protos.OperationClient) error {
|
||||
if req.Version == "latest" {
|
||||
// 최신 버전을 찾음
|
||||
latest, err := shared.FindLastestVersion(hc.config.StorageRoot, req.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
req.Version = latest
|
||||
}
|
||||
|
||||
meta := prepareProcessLaunch(hc.config.StorageRoot, req)
|
||||
if meta == nil {
|
||||
return errPrepareprocessLaunchFailed
|
||||
@ -433,16 +423,6 @@ func (hc *houstonClient) startChildProcess(req *shared.StartProcessRequest, op p
|
||||
}
|
||||
|
||||
func (hc *houstonClient) stopChildProcess(req *shared.StopProcessRequest, op protos.OperationClient) error {
|
||||
if req.Version == "latest" {
|
||||
// 최신 버전을 찾음
|
||||
latest, err := shared.FindLastestVersion(hc.config.StorageRoot, req.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
req.Version = latest
|
||||
}
|
||||
|
||||
killer := func(proc *procmeta) {
|
||||
proc.setState(protos.ProcessState_Stopping)
|
||||
if err := proc.cmd.Process.Signal(syscall.SIGTERM); err != nil {
|
||||
@ -509,16 +489,6 @@ func (hc *houstonClient) restartChildProcess(req *shared.RestartProcessRequest,
|
||||
}
|
||||
|
||||
func (hc *houstonClient) uploadFiles(req *shared.UploadRequest) error {
|
||||
if req.Version == "latest" {
|
||||
// 최신 버전을 찾음
|
||||
latest, err := shared.FindLastestVersion(hc.config.StorageRoot, req.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
req.Version = latest
|
||||
}
|
||||
|
||||
logger.Println("uploadFiles req :", *req)
|
||||
for _, child := range hc.childProcs {
|
||||
if child.version == req.Version && child.name == req.Name {
|
||||
|
||||
Reference in New Issue
Block a user