fix(task): add error handling for when a `FinishRun` fails (#15845)

pull/15853/head
Lyon Hill 2019-11-11 13:52:04 -07:00 committed by GitHub
parent b58e7947b1
commit 7421836a1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -352,8 +352,9 @@ func (w *worker) finish(p *promise, rs backend.RunStatus, err error) {
w.te.logger.Debug("Completed successfully", zap.String("taskID", p.task.ID.String()))
}
w.te.tcs.FinishRun(icontext.SetAuthorizer(p.ctx, p.auth), p.task.ID, p.run.ID)
if _, err := w.te.tcs.FinishRun(icontext.SetAuthorizer(p.ctx, p.auth), p.task.ID, p.run.ID); err != nil {
w.te.logger.Error("Failed to finish run", zap.String("taskID", p.task.ID.String()), zap.String("runID", p.run.ID.String()), zap.Error(err))
}
}
func (w *worker) executeQuery(p *promise) {