Skip to content

Commit

Permalink
server: more error logging in CreateTask
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstruck committed Jun 11, 2019
1 parent 660756d commit 4f8c9fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/tes.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ func (ts *TaskService) CreateTask(ctx context.Context, task *tes.Task) (*tes.Cre
}

// dispatch to compute backend
go ts.Compute.WriteEvent(ctx, events.NewTaskCreated(task))
go func() {
err := ts.Compute.WriteEvent(ctx, events.NewTaskCreated(task))
if err != nil {
ts.Log.Error("error submitting task to compute backend", "taskID", task.Id, "error", err)
}
}()

return &tes.CreateTaskResponse{Id: task.Id}, nil
}
Expand Down

0 comments on commit 4f8c9fd

Please sign in to comment.