Allow finer control for omit tagged jobs in retention policies

This commit is contained in:
2026-02-23 08:46:47 +01:00
parent defa8fa994
commit 03c65e06f6
8 changed files with 92 additions and 33 deletions

View File

@@ -28,10 +28,10 @@ func RegisterCompressionService(compressOlderThan int) {
lastTime := ar.CompressLast(startTime)
if startTime == lastTime {
cclog.Info("Compression Service - Complete archive run")
jobs, err = jobRepo.FindJobsBetween(0, startTime, false)
jobs, err = jobRepo.FindJobsBetween(0, startTime, "none")
} else {
jobs, err = jobRepo.FindJobsBetween(lastTime, startTime, false)
jobs, err = jobRepo.FindJobsBetween(lastTime, startTime, "none")
}
if err != nil {

View File

@@ -149,7 +149,7 @@ func transferJobsParquet(jobs []*schema.Job, src archive.ArchiveBackend, target
}
// cleanupAfterTransfer removes jobs from archive and optionally from DB.
func cleanupAfterTransfer(jobs []*schema.Job, startTime int64, includeDB bool, omitTagged bool) {
func cleanupAfterTransfer(jobs []*schema.Job, startTime int64, includeDB bool, omitTagged string) {
archive.GetHandle().CleanUp(jobs)
if includeDB {

View File

@@ -26,8 +26,8 @@ type Retention struct {
Policy string `json:"policy"`
Format string `json:"format"`
Age int `json:"age"`
IncludeDB bool `json:"includeDB"`
OmitTagged bool `json:"omitTagged"`
IncludeDB bool `json:"include-db"`
OmitTagged string `json:"omit-tagged"`
TargetKind string `json:"target-kind"`
TargetPath string `json:"target-path"`
TargetEndpoint string `json:"target-endpoint"`