Move ocm to the "delayed" group so that it can always reach the gateway

This commit is contained in:
André Duffeck
2023-10-24 10:10:54 +02:00
parent 668f917dba
commit b2eba874e9

View File

@@ -273,11 +273,6 @@ func NewService(options ...Option) (*Service, error) {
cfg.Webfinger.Commons = cfg.Commons
return webfinger.Execute(cfg.Webfinger)
})
reg(opts.Config.OCM.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
cfg.OCM.Context = ctx
cfg.OCM.Commons = cfg.Commons
return ocm.Execute(cfg.OCM)
})
// populate optional services
areg := func(name string, exec func(context.Context, *ociscfg.Config) error) {
@@ -323,6 +318,11 @@ func NewService(options ...Option) (*Service, error) {
cfg.SSE.Commons = cfg.Commons
return sse.Execute(cfg.SSE)
})
dreg(opts.Config.OCM.Service.Name, func(ctx context.Context, cfg *ociscfg.Config) error {
cfg.OCM.Context = ctx
cfg.OCM.Commons = cfg.Commons
return ocm.Execute(cfg.OCM)
})
return s, nil
}