mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Changes on function/metric loggers (#343)
* initial fix logger * dix DefaultFuncLogger * fix runner and tests * reverting: sending async task stdout to func logger
This commit is contained in:
@@ -42,7 +42,6 @@ func getTask(ctx context.Context, url string) (*models.Task, error) {
|
||||
|
||||
func getCfg(task *models.Task) *Config {
|
||||
// TODO: should limit the size of this, error if gets too big. akin to: https://golang.org/pkg/io/#LimitReader
|
||||
stderr := NewFuncLogger(task.AppName, task.Path, *task.Image, task.ID) // TODO: missing path here, how do i get that?
|
||||
if task.Timeout == nil {
|
||||
timeout := int32(30)
|
||||
task.Timeout = &timeout
|
||||
@@ -52,8 +51,6 @@ func getCfg(task *models.Task) *Config {
|
||||
Timeout: time.Duration(*task.Timeout) * time.Second,
|
||||
ID: task.ID,
|
||||
AppName: task.AppName,
|
||||
Stdout: stderr,
|
||||
Stderr: stderr,
|
||||
Env: task.EnvVars,
|
||||
}
|
||||
return cfg
|
||||
|
||||
Reference in New Issue
Block a user