Refactor task service metrics

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-09-05 11:50:56 -04:00
parent 16fcb8dc08
commit 697dcdd407
12 changed files with 965 additions and 99 deletions

View File

@@ -245,7 +245,10 @@ func (r *Runtime) Create(ctx context.Context, id string, opts runtime.CreateOpts
if err != nil {
return nil, errdefs.FromGRPC(err)
}
t := newTask(id, namespace, int(cr.Pid), s)
t, err := newTask(id, namespace, int(cr.Pid), s)
if err != nil {
return nil, err
}
if err := r.tasks.Add(ctx, t); err != nil {
return nil, err
}