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:
Denozordec
2026-07-31 12:26:18 +07:00
co-authored by Cursor
parent 13e3d21ce2
commit 8fe74c1d3b
18 changed files with 448 additions and 51 deletions
+2 -2
View File
@@ -2,8 +2,8 @@ package pipeline
import (
"context"
"evobgp/internal/logging"
"fmt"
"log"
"net/http"
"os"
"strings"
@@ -223,7 +223,7 @@ func collectCDNPrefixRows(ctx context.Context, st store.Backend, hc *http.Client
for _, r := range results {
if r.err != nil {
if cdnPartialOK() {
log.Printf("pipeline: CDN partial skip source error: %v", r.err)
logging.Default().Info(fmt.Sprintf("pipeline: CDN partial skip source error: %v", r.err))
skipped++
continue
}
+2 -2
View File
@@ -1,8 +1,8 @@
package pipeline
import (
"evobgp/internal/logging"
"fmt"
"log"
"net/netip"
"os"
"strings"
@@ -28,7 +28,7 @@ func cdnPartialOK() bool {
}
func logStaleUpstream(kind, detail string) {
log.Printf("pipeline: stale upstream fallback (%s): %s", kind, detail)
logging.Default().Info(fmt.Sprintf("pipeline: stale upstream fallback (%s): %s", kind, detail))
}
func staleASNPrefixes(st store.Backend, priorSnapshot []store.PrefixRow, asn int64) ([]store.PrefixRow, string, bool) {