fix(apiserver): validate, default and document job.terminate_interval (bug-1957)
The loader now stores the effective interval (10 s when unset or 0, LSF's JOB_TERMINATE_INTERVAL default) and refuses a negative one; app_schema.json describes the setting; src/docs/xce.md documents kill/stop behaviour and the interval. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
73fe8f787c
commit
97f7c800f1
4 changed files with 59 additions and 0 deletions
|
|
@ -247,6 +247,9 @@ func InitConf() error {
|
|||
if terminateInterval < 0 {
|
||||
return fmt.Errorf("job.terminate_interval must not be negative: %d", terminateInterval)
|
||||
}
|
||||
if terminateInterval == 0 {
|
||||
terminateInterval = defaultTerminateInterval
|
||||
}
|
||||
JobYamlConfig = &JobConfig{
|
||||
MaxArraySize: maxArraySize,
|
||||
TerminateInterval: terminateInterval,
|
||||
|
|
@ -316,6 +319,9 @@ func ParseMaxSize(maxSize string) (int64, error) {
|
|||
}
|
||||
|
||||
const (
|
||||
// defaultTerminateInterval is used when job.terminate_interval is unset
|
||||
// or 0: LSF's JOB_TERMINATE_INTERVAL default (bug-1957).
|
||||
defaultTerminateInterval = 10
|
||||
// defaultMaxArraySize is used when job.max_array_size is unset or 0.
|
||||
defaultMaxArraySize = 1000
|
||||
// supportedMaxArraySize is the largest array the API server creates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue