mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fixes async payload passing for #68.
This commit is contained in:
@@ -127,7 +127,8 @@ func startAsyncRunners(ctx context.Context, url string, rnr *Runner, ds models.D
|
||||
}
|
||||
|
||||
ctx, log := common.LoggerWithFields(ctx, logrus.Fields{"call_id": task.ID})
|
||||
log.Debug("Running task:", task.ID)
|
||||
log.Info("Running task:", task.ID)
|
||||
// log.Infof("Task: %+v", task)
|
||||
|
||||
wg.Add(1)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -63,6 +64,10 @@ func (rnr *Runner) RunTrackedTask(newTask *models.Task, ctx context.Context, cfg
|
||||
startedAt := strfmt.DateTime(time.Now())
|
||||
newTask.StartedAt = startedAt
|
||||
|
||||
// set payload as Stdin
|
||||
// fmt.Printf("ABOUT TO PASS IN PAYLOAD: %v", newTask.Payload)
|
||||
cfg.Stdin = strings.NewReader(newTask.Payload)
|
||||
|
||||
result, err := rnr.RunTask(ctx, cfg)
|
||||
|
||||
completedAt := strfmt.DateTime(time.Now())
|
||||
|
||||
Reference in New Issue
Block a user