feat(lifecycle-module): add debug message for onInit() execution
arcad/edge/pipeline/head This commit looks good
Details
arcad/edge/pipeline/head This commit looks good
Details
This commit is contained in:
parent
de4ab0d02c
commit
0cfb132b65
|
@ -2,6 +2,7 @@ package module
|
|||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"forge.cadoles.com/arcad/edge/pkg/app"
|
||||
"github.com/dop251/goja"
|
||||
|
@ -41,7 +42,11 @@ func (m *LifecycleModule) OnInit(ctx context.Context, rt *goja.Runtime) (err err
|
|||
}
|
||||
}()
|
||||
|
||||
logger.Debug(ctx, "executing app onInit() function")
|
||||
start := time.Now()
|
||||
call(nil)
|
||||
duration := time.Since(start)
|
||||
logger.Debug(ctx, "executed app onInit() function", logger.F("duration", duration.String()))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue