mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Merge branch 'func_logs2' into 'master'
Func logs feature See merge request !66
This commit is contained in:
@@ -60,7 +60,7 @@ import (
|
||||
// (internal clock)
|
||||
|
||||
// RunTrackedTask is just a wrapper for shared logic for async/sync runners
|
||||
func (rnr *Runner) RunTrackedTask(newTask *models.Task, ctx context.Context, cfg *task.Config, ds models.Datastore) (drivers.RunResult, error) {
|
||||
func (rnr *Runner) RunTrackedTask(newTask *models.Task, ctx context.Context, cfg *task.Config) (drivers.RunResult, error) {
|
||||
startedAt := strfmt.DateTime(time.Now())
|
||||
newTask.StartedAt = startedAt
|
||||
|
||||
@@ -78,7 +78,7 @@ func (rnr *Runner) RunTrackedTask(newTask *models.Task, ctx context.Context, cfg
|
||||
newTask.CompletedAt = completedAt
|
||||
newTask.Status = status
|
||||
|
||||
if err := ds.InsertTask(ctx, newTask); err != nil {
|
||||
if err := rnr.datastore.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
|
||||
logrus.WithError(err).Error("error inserting task into datastore")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user