domain/job.go: add OverlapPolicy field for per-job run policy
Adds OverlapPolicy field to Job struct with json:"overlap_policy,omitempty" tag. When empty, the field signals that the job should inherit the global overlap policy setting from Config. Also updates yamlJob shadow struct to maintain field-layout equivalence for YAML→JSON import compatibility. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,4 +14,5 @@ type Job struct {
|
|||||||
Arguments string `json:"arguments,omitempty"`
|
Arguments string `json:"arguments,omitempty"`
|
||||||
StartOnly bool `json:"start_only,omitempty"`
|
StartOnly bool `json:"start_only,omitempty"`
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
|
OverlapPolicy string `json:"overlap_policy,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,14 +36,15 @@ type yamlConfig struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type yamlJob struct {
|
type yamlJob struct {
|
||||||
ID int `yaml:"id"`
|
ID int `yaml:"id"`
|
||||||
Name string `yaml:"name"`
|
Name string `yaml:"name"`
|
||||||
Folder string `yaml:"folder,omitempty"`
|
Folder string `yaml:"folder,omitempty"`
|
||||||
Schedule string `yaml:"schedule"`
|
Schedule string `yaml:"schedule"`
|
||||||
Command string `yaml:"command"`
|
Command string `yaml:"command"`
|
||||||
Arguments string `yaml:"arguments,omitempty"`
|
Arguments string `yaml:"arguments,omitempty"`
|
||||||
StartOnly bool `yaml:"start_only,omitempty"`
|
StartOnly bool `yaml:"start_only,omitempty"`
|
||||||
Enabled bool `yaml:"enabled"`
|
Enabled bool `yaml:"enabled"`
|
||||||
|
OverlapPolicy string `yaml:"overlap_policy,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type yamlJobsFile struct {
|
type yamlJobsFile struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user