diff --git a/stacks/clouformation.go b/stacks/clouformation.go index 5b8d5bd..b6ac231 100644 --- a/stacks/clouformation.go +++ b/stacks/clouformation.go @@ -2,10 +2,11 @@ package stacks import ( "fmt" - "github.com/daidokoro/qaz/utils" "sync" "time" + "github.com/daidokoro/qaz/utils" + "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudformation" ) @@ -59,6 +60,10 @@ func DeployHandler(runstacks map[string]string, stacks map[string]*Stack) { // status - pending, failed, completed var status = make(map[string]string) + // kick off tail mechanism + tail = make(chan *TailServiceInput) + go TailService(tail) + for _, stk := range stacks { if _, ok := runstacks[stk.Name]; !ok && len(runstacks) > 0 { @@ -161,6 +166,10 @@ func DeployHandler(runstacks map[string]string, stacks map[string]*Stack) { // TerminateHandler - Handles terminating stacks in the correct order func TerminateHandler(runstacks map[string]string, stacks map[string]*Stack) { + // kick off tail mechanism + tail = make(chan *TailServiceInput) + go TailService(tail) + for _, stk := range stacks { if _, ok := runstacks[stk.Name]; !ok && len(runstacks) > 0 { Log.Debug(fmt.Sprintf("%s: not in run.stacks, skipping", stk.Name))