feat(jobs): add durable PG queue reclaim, slog, and richer metrics
JSON slog в ключевых пакетах; Prometheus path_group, job_audit_depth, upstream breaker; job_audit ClaimQueued/ReclaimStaleRunning + Adopt loop для HA после рестарта. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -2,8 +2,8 @@ package maintenance
|
||||
|
||||
import (
|
||||
"context"
|
||||
"evobgp/internal/logging"
|
||||
"fmt"
|
||||
"log"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -35,7 +35,7 @@ func StartScheduler(ctx context.Context, provider *ConfigProvider, enqueue func(
|
||||
}
|
||||
sched, err := parser.Parse(p.Schedule)
|
||||
if err != nil {
|
||||
log.Printf("maintenance: invalid cron for policy %s: %v", p.ID, err)
|
||||
logging.Default().Info(fmt.Sprintf("maintenance: invalid cron for policy %s: %v", p.ID, err))
|
||||
continue
|
||||
}
|
||||
schedules[p.ID] = sched
|
||||
@@ -81,5 +81,5 @@ func StartScheduler(ctx context.Context, provider *ConfigProvider, enqueue func(
|
||||
}
|
||||
}
|
||||
}()
|
||||
log.Printf("maintenance: policy scheduler started (tick=%s)", tick)
|
||||
logging.Default().Info(fmt.Sprintf("maintenance: policy scheduler started (tick=%s)", tick))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user