From 7f57f687255e7f37db3e5531e62df6d0d442dd69 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Tue, 17 Oct 2023 16:05:55 +0200 Subject: [PATCH] start frontend delayed Signed-off-by: jkoberg --- ocis/pkg/runtime/service/service.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ocis/pkg/runtime/service/service.go b/ocis/pkg/runtime/service/service.go index 3b421497c2..3a3b0e2717 100644 --- a/ocis/pkg/runtime/service/service.go +++ b/ocis/pkg/runtime/service/service.go @@ -162,11 +162,6 @@ func NewService(options ...Option) (*Service, error) { cfg.EventHistory.Commons = cfg.Commons return eventhistory.Execute(cfg.EventHistory) }) - reg(opts.Config.Frontend.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error { - cfg.Frontend.Context = ctx - cfg.Frontend.Commons = cfg.Commons - return frontend.Execute(cfg.Frontend) - }) reg(opts.Config.Gateway.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error { cfg.Gateway.Context = ctx cfg.Gateway.Commons = cfg.Commons @@ -302,6 +297,11 @@ func NewService(options ...Option) (*Service, error) { dreg := func(name string, exec func(context.Context, *ociscfg.Config) error) { s.Delayed[name] = NewSutureServiceBuilder(exec) } + dreg(opts.Config.Frontend.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error { + cfg.Frontend.Context = ctx + cfg.Frontend.Commons = cfg.Commons + return frontend.Execute(cfg.Frontend) + }) dreg(opts.Config.IDP.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error { cfg.IDP.Context = ctx cfg.IDP.Commons = cfg.Commons