|
@ -10,7 +10,7 @@ func daemonSub(sub *Process) { |
|
|
sub.Wait() |
|
|
sub.Wait() |
|
|
} |
|
|
} |
|
|
log.Warningf("Catch process %s exit", sub.name) |
|
|
log.Warningf("Catch process %s exit", sub.name) |
|
|
time.Sleep(100 * time.Millisecond) // delay 100ms
|
|
|
time.Sleep(3 * time.Second) // delay 3s
|
|
|
if !exitFlag { // not in exit process
|
|
|
if !exitFlag { // not in exit process
|
|
|
sub.Run(true) |
|
|
sub.Run(true) |
|
|
log.Infof("Process %s restart success", sub.name) |
|
|
log.Infof("Process %s restart success", sub.name) |
|
@ -23,7 +23,7 @@ func (p *Process) Daemon() { |
|
|
log.Infof("Process %s disabled -> skip daemon", p.name) |
|
|
log.Infof("Process %s disabled -> skip daemon", p.name) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
log.Infof("Start daemon of process %s", p.name) |
|
|
log.Infof("Daemon of process %s start", p.name) |
|
|
go func() { |
|
|
go func() { |
|
|
daemonSub(p) // start daemon process
|
|
|
daemonSub(p) // start daemon process
|
|
|
log.Infof("Process %s exit daemon mode", p.name) |
|
|
log.Infof("Process %s exit daemon mode", p.name) |
|
|