gotd/updates: initialize channel state runctx immediately

This commit is contained in:
Tulir Asokan
2025-12-11 14:37:01 +02:00
parent 042304f147
commit d03260c4a7
4 changed files with 23 additions and 24 deletions
+3 -3
View File
@@ -84,8 +84,8 @@ func (m *Manager) Run(ctx context.Context, api API, userID int64, opt AuthOption
zap.Bool("is_bot", opt.IsBot),
zap.Bool("forget", opt.Forget),
)
lg.Debug("Run")
defer lg.Debug("Done")
lg.Info("Starting update manager")
defer lg.Info("Update manager exiting")
wg, ctx := errgroup.WithContext(ctx)
@@ -157,7 +157,7 @@ func (m *Manager) Run(ctx context.Context, api API, userID int64, opt AuthOption
wg.Go(func() error {
return m.state.Run(ctx)
})
lg.Debug("Wait")
lg.Debug("Waiting for manager workgroup to exit")
return wg.Wait()
}