to separate controll ower the http and grpc driven services

This commit is contained in:
Roman Perekhod
2025-05-20 23:41:26 +02:00
parent 26cbb5396b
commit e1325ca40f
44 changed files with 370 additions and 331 deletions

View File

@@ -48,11 +48,11 @@ func Server(cfg *config.Config) *cli.Command {
}
var cancel context.CancelFunc
ctx := cfg.Context
if ctx == nil {
ctx, cancel = signal.NotifyContext(context.Background(), runner.StopSignals...)
if cfg.Context == nil {
cfg.Context, cancel = signal.NotifyContext(context.Background(), runner.StopSignals...)
defer cancel()
}
ctx := cfg.Context
m := metrics.New()
m.BuildInfo.WithLabelValues(version.GetString()).Set(1)