Skip to content

Commit

Permalink
fix: initialize instance again
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDevMinerTV committed Sep 22, 2024
1 parent c8b0dc8 commit 9e50aff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 9e50aff

Please sign in to comment.