Skip to content

Commit 9ad187d

Browse files
committed
move rotator out of coderd
1 parent 6432b0d commit 9ad187d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cli/server.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,12 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
746746
return xerrors.Errorf("set deployment id: %w", err)
747747
}
748748

749+
// Start a background process that rotates keys.
750+
err = cryptokeys.StartRotator(ctx, options.Logger.Named("keyrotator"), options.Database)
751+
if err != nil {
752+
return xerrors.Errorf("start key rotator: %w", err)
753+
}
754+
749755
fetcher := &cryptokeys.DBFetcher{
750756
DB: options.Database,
751757
}

coderd/coderd.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -449,12 +449,6 @@ func New(options *Options) *API {
449449
panic(xerrors.Errorf("get deployment ID: %w", err))
450450
}
451451

452-
// Start a background process that rotates keys.
453-
err = cryptokeys.StartRotator(ctx, options.Logger.Named("keyrotator"), options.Database)
454-
if err != nil {
455-
options.Logger.Fatal(ctx, "start key rotator", slog.Error(err))
456-
}
457-
458452
fetcher := &cryptokeys.DBFetcher{
459453
DB: options.Database,
460454
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy