로그 추가
This commit is contained in:
@ -372,10 +372,14 @@ func NewClient(standalone bool) (HoustonClient, error) {
|
||||
op.Refresh(ctx, hc.makeOperationQueryRequest())
|
||||
|
||||
case resp := <-operationChan:
|
||||
logger.Println("houton query operation :", resp.Operation)
|
||||
|
||||
switch shared.Operation(resp.Operation) {
|
||||
case shared.Deploy:
|
||||
var dr shared.DeployRequest
|
||||
unmarshal(&dr, resp.Args)
|
||||
logger.Println("args :", dr)
|
||||
|
||||
if dr.Name == myname {
|
||||
if srcdir, replacer, err := hc.prepareUpdateSelf(&dr); err == nil {
|
||||
args := []string{
|
||||
@ -431,6 +435,8 @@ func NewClient(standalone bool) (HoustonClient, error) {
|
||||
case shared.Withdraw:
|
||||
var wr shared.WithdrawRequest
|
||||
unmarshal(&wr, resp.Args)
|
||||
logger.Println("args :", wr)
|
||||
|
||||
err := hc.withdraw(&wr)
|
||||
if err == nil {
|
||||
prog := gatherDeployedPrograms(hc.config.StorageRoot, wr.Name)
|
||||
@ -447,6 +453,8 @@ func NewClient(standalone bool) (HoustonClient, error) {
|
||||
case shared.Start:
|
||||
var sr shared.StartProcessRequest
|
||||
unmarshal(&sr, resp.Args)
|
||||
logger.Println("args :", sr)
|
||||
|
||||
if err := hc.startChildProcess(&sr); err != nil {
|
||||
logger.ErrorWithCallStack(err)
|
||||
} else {
|
||||
@ -456,6 +464,8 @@ func NewClient(standalone bool) (HoustonClient, error) {
|
||||
case shared.Stop:
|
||||
var sr shared.StopProcessRequest
|
||||
unmarshal(&sr, resp.Args)
|
||||
logger.Println("args :", sr)
|
||||
|
||||
if err := hc.stopChildProcess(&sr, op); err != nil {
|
||||
logger.Println(err)
|
||||
}
|
||||
@ -463,6 +473,8 @@ func NewClient(standalone bool) (HoustonClient, error) {
|
||||
case shared.Restart:
|
||||
var rr shared.RestartProcessRequest
|
||||
unmarshal(&rr, resp.Args)
|
||||
logger.Println("args :", rr)
|
||||
|
||||
if err := hc.restartChildProcess(&rr, op); err != nil {
|
||||
logger.Println(err)
|
||||
}
|
||||
@ -470,6 +482,8 @@ func NewClient(standalone bool) (HoustonClient, error) {
|
||||
case shared.Upload:
|
||||
var ur shared.UploadRequest
|
||||
unmarshal(&ur, resp.Args)
|
||||
logger.Println("args :", ur)
|
||||
|
||||
if err := hc.uploadFiles(&ur); err != nil {
|
||||
logger.Println(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user