linting
This commit is contained in:
@@ -39,6 +39,7 @@ func New(logger mlogger.Logger, cfgPath string) (*App, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &App{
|
||||
logger: logger,
|
||||
cfg: cfg,
|
||||
@@ -50,7 +51,9 @@ func (a *App) Run(ctx context.Context) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
a.logger.Debug("Metrics server initialised")
|
||||
|
||||
defer metricsSrv.Close(context.Background()) //nolint:contextcheck
|
||||
|
||||
conn, err := db.ConnectMongo(a.logger, a.cfg.Database) //nolint:contextcheck
|
||||
@@ -65,6 +68,7 @@ func (a *App) Run(ctx context.Context) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
a.logger.Debug("Storage repository initialised")
|
||||
|
||||
service, err := ingestor.New(a.logger, a.cfg, repo)
|
||||
@@ -95,7 +99,8 @@ func (a *App) Run(ctx context.Context) error {
|
||||
a.logger.Info("Starting FX ingestor service", zap.String("version", appversion.Create().Info()))
|
||||
metricsSrv.SetStatus(health.SSRunning)
|
||||
|
||||
if err := service.Run(ctx); err != nil {
|
||||
err = service.Run(ctx)
|
||||
if err != nil {
|
||||
if !errors.Is(err, context.Canceled) { // ignore termination reques error
|
||||
a.logger.Error("Ingestor service exited with error", zap.Error(err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user