Log start tasks
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
cf3b72852a
commit
6bfc4df8a7
1 changed files with 6 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/docker/containerd/runtime"
|
"github.com/docker/containerd/runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -33,6 +34,11 @@ func (w *worker) Start() {
|
||||||
defer w.wg.Done()
|
defer w.wg.Done()
|
||||||
for t := range w.s.tasks {
|
for t := range w.s.tasks {
|
||||||
started := time.Now()
|
started := time.Now()
|
||||||
|
logrus.WithFields(logrus.Fields{
|
||||||
|
"containerID": t.Container.ID(),
|
||||||
|
"checkpoint": t.Checkpoint,
|
||||||
|
"started": started,
|
||||||
|
}).Debug("worker received task")
|
||||||
if t.Checkpoint != "" {
|
if t.Checkpoint != "" {
|
||||||
if err := t.Container.Restore(t.Checkpoint); err != nil {
|
if err := t.Container.Restore(t.Checkpoint); err != nil {
|
||||||
evt := NewEvent(DeleteEventType)
|
evt := NewEvent(DeleteEventType)
|
||||||
|
|
Loading…
Reference in a new issue