(seconds int64)
| 2958 | } |
| 2959 | |
| 2960 | func validateAgentTaskLeaseSeconds(seconds int64) error { |
| 2961 | if seconds < 0 { |
| 2962 | return fmt.Errorf("cli: --lease-seconds must be zero or positive: %d", seconds) |
| 2963 | } |
| 2964 | maxSeconds := int64(taskpkg.MaxRunLeaseDuration.Seconds()) |
| 2965 | if seconds > maxSeconds { |
| 2966 | return fmt.Errorf("cli: --lease-seconds must be less than or equal to %d", maxSeconds) |
| 2967 | } |
| 2968 | return nil |
| 2969 | } |
| 2970 | |
| 2971 | func trimAgentTaskCapabilities(values []string) []string { |
| 2972 | if len(values) == 0 { |
no outgoing calls
no test coverage detected