Skip to content

Commit 0a0c7a9

Browse files
Eslam-Nawaraashraffouda
authored andcommitted
load env when needed in registration
1 parent d6c3d18 commit 0a0c7a9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmds/modules/noded/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ var Module cli.Command = cli.Command{
5858
Action: action,
5959
}
6060

61-
func registerationServer(ctx context.Context, msgBrokerCon string, env environment.Environment, info registrar.RegistrationInfo) error {
61+
func registerationServer(ctx context.Context, msgBrokerCon string, info registrar.RegistrationInfo) error {
6262
redis, err := zbus.NewRedisClient(msgBrokerCon)
6363
if err != nil {
6464
return errors.Wrap(err, "fail to connect to message broker server")
@@ -69,7 +69,7 @@ func registerationServer(ctx context.Context, msgBrokerCon string, env environme
6969
return errors.Wrap(err, "fail to connect to message broker server")
7070
}
7171

72-
registrar := registrar.NewRegistrar(ctx, redis, env, info)
72+
registrar := registrar.NewRegistrar(ctx, redis, info)
7373
server.Register(zbus.ObjectID{Name: "registrar", Version: "0.0.1"}, registrar)
7474
log.Debug().Msg("object registered")
7575
if err := server.Run(ctx); err != nil && err != context.Canceled {
@@ -159,7 +159,7 @@ func action(cli *cli.Context) error {
159159
WithSecureBoot(secureBoot).
160160
WithVirtualized(len(hypervisor) != 0)
161161

162-
go registerationServer(ctx, msgBrokerCon, env, info)
162+
go registerationServer(ctx, msgBrokerCon, info)
163163
log.Info().Msg("start perf scheduler")
164164

165165
perfMon, err := perf.NewPerformanceMonitor(msgBrokerCon)

0 commit comments

Comments
 (0)