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