1 Commits

Author SHA1 Message Date
Fredrik Adelöw 0b8b67767b fix(catalog-backend): prevent overlapping stitches for the same entity
markForStitching now only updates the ticket on conflict, leaving
next_stitch_at unchanged so an in-progress worker isn't interrupted.

markDeferredStitchCompleted bumps next_stitch_at to now() when the
ticket changed, so pending re-stitches happen immediately after the
current stitch finishes rather than waiting for the timeout.

performStitching no longer calls markDeferredStitchCompleted when
abandoned due to a stale ticket, since the queue entry belongs to
another worker.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-22 16:57:53 +02:00