Use channel to pass the stop info instead of polling for container stop

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
This commit is contained in:
Yanqiang Miao
2018-01-24 11:28:50 +08:00
parent 4fcf8d91b8
commit c663d2423e
4 changed files with 44 additions and 50 deletions

View File

@@ -155,6 +155,8 @@ func (em *eventMonitor) handleEvent(evt *events.Envelope) {
// TODO(random-liu): [P0] Enqueue the event and retry.
return
}
// Using channel to propagate the information of container stop
cntr.Stop()
case *eventtypes.TaskOOM:
e := any.(*eventtypes.TaskOOM)
logrus.Infof("TaskOOM event %+v", e)