mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: improve terraform install performance (#7478)
This commit is contained in:
+1
-3
@@ -243,13 +243,11 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
|
||||
notifyCtx, notifyStop := signal.NotifyContext(ctx, InterruptSignals...)
|
||||
defer notifyStop()
|
||||
|
||||
// Ensure we have a unique cache directory for this process.
|
||||
cacheDir := filepath.Join(cfg.CacheDir.String(), uuid.NewString())
|
||||
cacheDir := cfg.CacheDir.String()
|
||||
err = os.MkdirAll(cacheDir, 0o700)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("create cache directory: %w", err)
|
||||
}
|
||||
defer os.RemoveAll(cacheDir)
|
||||
|
||||
// Clean up idle connections at the end, e.g.
|
||||
// embedded-postgres can leave an idle connection
|
||||
|
||||
Reference in New Issue
Block a user