From 8f75318e8cbab130d586e919ab6722e4f8edf6c9 Mon Sep 17 00:00:00 2001 From: mixeme Date: Wed, 24 Jun 2026 20:57:00 +0300 Subject: [PATCH] domain/job.go: add OverlapPolicy field for per-job run policy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/domain/job.go | 1 + src/storage/store.go | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/domain/job.go b/src/domain/job.go index 5a64492..f5f2695 100644 --- a/src/domain/job.go +++ b/src/domain/job.go @@ -14,4 +14,5 @@ type Job struct { Arguments string `json:"arguments,omitempty"` StartOnly bool `json:"start_only,omitempty"` Enabled bool `json:"enabled"` + OverlapPolicy string `json:"overlap_policy,omitempty"` } diff --git a/src/storage/store.go b/src/storage/store.go index c088d5b..27cbbdd 100644 --- a/src/storage/store.go +++ b/src/storage/store.go @@ -36,14 +36,15 @@ type yamlConfig struct { } type yamlJob struct { - ID int `yaml:"id"` - Name string `yaml:"name"` - Folder string `yaml:"folder,omitempty"` - Schedule string `yaml:"schedule"` - Command string `yaml:"command"` - Arguments string `yaml:"arguments,omitempty"` - StartOnly bool `yaml:"start_only,omitempty"` - Enabled bool `yaml:"enabled"` + ID int `yaml:"id"` + Name string `yaml:"name"` + Folder string `yaml:"folder,omitempty"` + Schedule string `yaml:"schedule"` + Command string `yaml:"command"` + Arguments string `yaml:"arguments,omitempty"` + StartOnly bool `yaml:"start_only,omitempty"` + Enabled bool `yaml:"enabled"` + OverlapPolicy string `yaml:"overlap_policy,omitempty"` } type yamlJobsFile struct {