Skip to content

Commit

Permalink
Merge branch 'master' into update-kylin
Browse files Browse the repository at this point in the history
  • Loading branch information
kaaaaaaang authored Nov 21, 2022
2 parents d3c6548 + fecb02e commit 7a695ff
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions components/playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,55 +1012,55 @@ func (p *Playground) terminate(sig syscall.Signal) {
timer.Stop()
}

if p.monitor != nil {
if p.monitor != nil && p.monitor.cmd != nil && p.monitor.cmd.Process != nil {
go kill("prometheus", p.monitor.cmd.Process.Pid, p.monitor.wait)
}

if p.ngmonitoring != nil {
if p.ngmonitoring != nil && p.ngmonitoring.cmd != nil && p.ngmonitoring.cmd.Process != nil {
go kill("ng-monitoring", p.ngmonitoring.cmd.Process.Pid, p.ngmonitoring.wait)
}

if p.grafana != nil {
if p.grafana != nil && p.grafana.cmd != nil && p.grafana.cmd.Process != nil {
go kill("grafana", p.grafana.cmd.Process.Pid, p.grafana.wait)
}
for _, inst := range p.tiflashs {
if inst.Process != nil {
if inst.Process != nil && inst.Process.Cmd() != nil && inst.Process.Cmd().Process != nil {
kill(inst.Component(), inst.Pid(), inst.Wait)
}
}
for _, inst := range p.ticdcs {
if inst.Process != nil {
if inst.Process != nil && inst.Process.Cmd() != nil && inst.Process.Cmd().Process != nil {
kill(inst.Component(), inst.Pid(), inst.Wait)
}
}
for _, inst := range p.tikvCdcs {
if inst.Process != nil {
if inst.Process != nil && inst.Process.Cmd() != nil && inst.Process.Cmd().Process != nil {
kill(inst.Component(), inst.Pid(), inst.Wait)
}
}
for _, inst := range p.drainers {
if inst.Process != nil {
if inst.Process != nil && inst.Process.Cmd() != nil && inst.Process.Cmd().Process != nil {
kill(inst.Component(), inst.Pid(), inst.Wait)
}
}
// tidb must exit earlier then pd
for _, inst := range p.tidbs {
if inst.Process != nil {
if inst.Process != nil && inst.Process.Cmd() != nil && inst.Process.Cmd().Process != nil {
kill(inst.Component(), inst.Pid(), inst.Wait)
}
}
for _, inst := range p.pumps {
if inst.Process != nil {
if inst.Process != nil && inst.Process.Cmd() != nil && inst.Process.Cmd().Process != nil {
kill(inst.Component(), inst.Pid(), inst.Wait)
}
}
for _, inst := range p.tikvs {
if inst.Process != nil {
if inst.Process != nil && inst.Process.Cmd() != nil && inst.Process.Cmd().Process != nil {
kill(inst.Component(), inst.Pid(), inst.Wait)
}
}
for _, inst := range p.pds {
if inst.Process != nil {
if inst.Process != nil && inst.Process.Cmd() != nil && inst.Process.Cmd().Process != nil {
kill(inst.Component(), inst.Pid(), inst.Wait)
}
}
Expand Down

0 comments on commit 7a695ff

Please sign in to comment.