Skip to content

Commit

Permalink
Shut down engines cleanly
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidS-ovm committed Feb 28, 2024
1 parent d6c3d3f commit 39f4df7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/terraform_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ func TerraformPlan(ctx context.Context, files []string, ready chan bool) int {
log.WithError(err).Error("failed to start AWS source engine")
return 1
}
defer func() {
_ = awsEngine.Stop()
}()

stdlibEngine, err := stdlibsource.InitializeStdlibSourceEngine(natsOptions, 2_000, true)
if err != nil {
Expand All @@ -213,6 +216,9 @@ func TerraformPlan(ctx context.Context, files []string, ready chan bool) int {
log.WithError(err).Error("failed to start stdlib source engine")
return 1
}
defer func() {
_ = stdlibEngine.Stop()
}()

prompt := `# Doing something
Expand Down

0 comments on commit 39f4df7

Please sign in to comment.