P1.5: drop SuccessExitCodes field and exit-code flexibility
Remove the SuccessExitCodes field from domain.Job and every layer that read or wrote it: runner/exitcodes.go (deleted), runner.go runStateDetail simplified to 0=OK / non-zero=Failed, logfile.go, format.go, operations.go, store.go, job_dialog.go, and jobs_view.go. Tests updated accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,8 +40,7 @@ type yamlJob struct {
|
||||
Schedule string `yaml:"schedule"`
|
||||
Command string `yaml:"command"`
|
||||
Arguments string `yaml:"arguments,omitempty"`
|
||||
SuccessExitCodes string `yaml:"success_exit_codes,omitempty"`
|
||||
StartOnly bool `yaml:"start_only,omitempty"`
|
||||
StartOnly bool `yaml:"start_only,omitempty"`
|
||||
Enabled bool `yaml:"enabled"`
|
||||
}
|
||||
|
||||
@@ -246,10 +245,6 @@ func normalizeJobs(jobs []domain.Job) {
|
||||
job.Command = echoCommand("GoSentry job ran")
|
||||
}
|
||||
job.Arguments = strings.TrimSpace(job.Arguments)
|
||||
job.SuccessExitCodes = strings.TrimSpace(job.SuccessExitCodes)
|
||||
if job.SuccessExitCodes == "" {
|
||||
job.SuccessExitCodes = "0"
|
||||
}
|
||||
// Runtime state (last run, next run, status, output, activity) is no longer
|
||||
// part of Job. It is reconstructed each time the app starts via
|
||||
// domain.NewRuntime, so normalizeJobs only touches durable configuration.
|
||||
|
||||
Reference in New Issue
Block a user