From 792aba253e943131b30b5e1b1b37c8fa024e5b86 Mon Sep 17 00:00:00 2001 From: DevMiner Date: Sun, 22 Sep 2024 01:37:41 +0200 Subject: [PATCH] fix: initialize instance again --- main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b019d4b..82a233b 100644 --- a/main.go +++ b/main.go @@ -99,6 +99,11 @@ func main() { log.Fatal().Err(err).Msg("Failed to run schema migration") } + log.Debug().Msg("Initializing instance") + if err := initInstance(db, tel); err != nil { + log.Fatal().Err(err).Msg("Failed to initialize instance") + } + // Stateless services requestSigner := svc_impls.NewRequestSignerImpl(tel, zerologr.New(&log.Logger).WithName("request-signer")) @@ -226,8 +231,8 @@ func migrateDB(db *ent.Client, log logr.Logger, telemetry *unitel.Telemetry) err return nil } -func initServerActor(db *ent.Client, telemetry *unitel.Telemetry) error { - s := telemetry.StartSpan(context.Background(), "function", "main.initServerActor") +func initInstance(db *ent.Client, telemetry *unitel.Telemetry) error { + s := telemetry.StartSpan(context.Background(), "function", "main.initInstance") defer s.End() ctx := s.Context()