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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"time"
|
||||||
|
|
||||||
"forge.cadoles.com/arcad/edge/pkg/app"
|
"forge.cadoles.com/arcad/edge/pkg/app"
|
||||||
"github.com/dop251/goja"
|
"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)
|
call(nil)
|
||||||
|
duration := time.Since(start)
|
||||||
|
logger.Debug(ctx, "executed app onInit() function", logger.F("duration", duration.String()))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue