mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
don't overwrite error when inserting into db
This commit is contained in:
@@ -73,8 +73,10 @@ func (rnr *Runner) RunTrackedTask(newTask *models.Task, ctx context.Context, cfg
|
|||||||
newTask.CompletedAt = completedAt
|
newTask.CompletedAt = completedAt
|
||||||
newTask.Status = status
|
newTask.Status = status
|
||||||
|
|
||||||
err = ds.InsertTask(ctx, newTask)
|
if err := ds.InsertTask(ctx, newTask); err != nil {
|
||||||
// TODO we should just log this error not return it to user? just issue storing task status but task is run
|
// TODO we should just log this error not return it to user? just issue storing task status but task is run
|
||||||
|
logrus.WithError(err).Error("error inserting task into datastore")
|
||||||
|
}
|
||||||
|
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user