Skip to content

Commit

Permalink
Fix benchmark and dashboard timeouts. #336
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidaguerre committed Apr 24, 2024
1 parent ff5a756 commit 04a3197
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func runCheckCmd[T controlinit.CheckTarget](cmd *cobra.Command, args []string) {
var ctx context.Context
// if a benchmark timeout was specified, use that
if executionTimeout := viper.GetInt(constants.ArgBenchmarkTimeout); executionTimeout > 0 {
ctx, cancel = context.WithTimeout(cmd.Context(), time.Duration(executionTimeout))
ctx, cancel = context.WithTimeout(cmd.Context(), time.Duration(executionTimeout)*time.Second)
} else {
ctx, cancel = context.WithCancel(cmd.Context())
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Powerpipe server runs in the foreground; Press Ctrl-C to exit.`,
AddStringSliceFlag(constants.ArgVariable, []string{}, "Specify the value of a variable. Multiple --var arguments may be passed.").
AddStringFlag(constants.ArgVarFile, "", "Specify a .ppvar file containing variable values.").
AddStringFlag(constants.ArgDatabase, app_specific.DefaultDatabase, "Turbot Pipes workspace database").
AddIntFlag(constants.ArgBenchmarkTimeout, 0, "Set a the dashboard execution timeout")
AddIntFlag(constants.ArgDashboardTimeout, 0, "Set a the dashboard execution timeout")

return cmd
}
Expand Down

0 comments on commit 04a3197

Please sign in to comment.