GetTerminationGracePeriodDuration returns the terminationGracePeriodSeconds of podSpec in Time.Duration format
()
| 805 | |
| 806 | // GetTerminationGracePeriodDuration returns the terminationGracePeriodSeconds of podSpec in Time.Duration format |
| 807 | func GetTerminationGracePeriodDuration() time.Duration { |
| 808 | x, _ := strconv.ParseInt(os.Getenv(common.EnvVarTerminationGracePeriodSeconds), 10, 64) |
| 809 | if x > 0 { |
| 810 | return time.Duration(x) * time.Second |
| 811 | } |
| 812 | return 30 * time.Second |
| 813 | } |
| 814 | |
| 815 | // CaptureScriptResult will add the stdout of a script template as output result |
| 816 | func (we *WorkflowExecutor) CaptureScriptResult(ctx context.Context) error { |
no test coverage detected