Skip to content

Commit 4a72e4f

Browse files
chore: rename cfg to notificationsCfg
1 parent 7ba3a6c commit 4a72e4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/server.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -898,16 +898,16 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
898898

899899
// Manage notifications.
900900
var (
901-
cfg = options.DeploymentValues.Notifications
901+
notificationsCfg = options.DeploymentValues.Notifications
902902
notificationsManager *notifications.Manager
903903
)
904904

905-
if cfg.Enabled {
905+
if notificationsCfg.Enabled {
906906
metrics := notifications.NewMetrics(options.PrometheusRegistry)
907907
helpers := templateHelpers(options)
908908

909909
// The enqueuer is responsible for enqueueing notifications to the given store.
910-
enqueuer, err := notifications.NewStoreEnqueuer(cfg, options.Database, helpers, logger.Named("notifications.enqueuer"), quartz.NewReal())
910+
enqueuer, err := notifications.NewStoreEnqueuer(notificationsCfg, options.Database, helpers, logger.Named("notifications.enqueuer"), quartz.NewReal())
911911
if err != nil {
912912
return xerrors.Errorf("failed to instantiate notification store enqueuer: %w", err)
913913
}
@@ -916,7 +916,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
916916
// The notification manager is responsible for:
917917
// - creating notifiers and managing their lifecycles (notifiers are responsible for dequeueing/sending notifications)
918918
// - keeping the store updated with status updates
919-
notificationsManager, err = notifications.NewManager(cfg, options.Database, helpers, metrics, logger.Named("notifications.manager"))
919+
notificationsManager, err = notifications.NewManager(notificationsCfg, options.Database, helpers, metrics, logger.Named("notifications.manager"))
920920
if err != nil {
921921
return xerrors.Errorf("failed to instantiate notification manager: %w", err)
922922
}

0 commit comments

Comments
 (0)