lab5: исправления по ревью
Concurrent complete no longer deletes the shared verified source; admission is atomic and covers pending presign rows; relay reconciles queued jobs lost to dead-lettering; failed staging is protected until failed_retention; timestamps normalized to UTC; reprocess prefers the durable original and keeps job->attachment lock order; heartbeat errors no longer burn attempts; confirm timeout enforced; pinned images and sanitized health responses.
This commit is contained in:
+4
-3
@@ -162,6 +162,7 @@ func run(cfg config.Config, log *slog.Logger) error {
|
||||
ClaimTTL: cfg.Outbox.ClaimTTL,
|
||||
Batch: cfg.Outbox.Batch,
|
||||
ReaperInterval: cfg.Outbox.ReaperInterval,
|
||||
ReconcileAfter: cfg.Outbox.ReconcileAfter,
|
||||
Retention: cfg.Outbox.Retention,
|
||||
}, log)
|
||||
|
||||
@@ -212,14 +213,14 @@ func healthServer(
|
||||
defer cancel()
|
||||
|
||||
if err := store.Ping(ctx); err != nil {
|
||||
writeHealth(w, http.StatusServiceUnavailable, map[string]any{"status": "unavailable", "database": err.Error()})
|
||||
writeHealth(w, http.StatusServiceUnavailable, map[string]any{"status": "unavailable"})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if !pub.Connected() {
|
||||
if err := pub.Connect(); err != nil {
|
||||
writeHealth(w, http.StatusServiceUnavailable, map[string]any{"status": "unavailable", "broker": err.Error()})
|
||||
writeHealth(w, http.StatusServiceUnavailable, map[string]any{"status": "unavailable"})
|
||||
|
||||
return
|
||||
}
|
||||
@@ -227,7 +228,7 @@ func healthServer(
|
||||
|
||||
oldest, err := relay.Health(ctx)
|
||||
if err != nil {
|
||||
writeHealth(w, http.StatusServiceUnavailable, map[string]any{"status": "unavailable", "outbox": err.Error()})
|
||||
writeHealth(w, http.StatusServiceUnavailable, map[string]any{"status": "unavailable"})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user