feat(reconciler): lab5 recover expired leases and cleanup staging

This commit is contained in:
Голиков Maximillian Антон
2026-11-11 12:40:53 +03:00
parent f748c09e10
commit d40b339906
4 changed files with 141 additions and 63 deletions
+5 -2
View File
@@ -41,11 +41,14 @@ type AttachmentRepository interface {
GetByID(ctx context.Context, id string) (*Attachment, error)
MarkReady(ctx context.Context, id string) error
MarkFailed(ctx context.Context, id string, errorCode string) error
ListStalePending(ctx context.Context, olderThan time.Time, limit int) ([]Attachment, error)
ExistingKeys(ctx context.Context, keys []string) ([]string, error)
DeletePending(ctx context.Context, id string) error
CreateInTx(ctx context.Context, tx Tx, a *Attachment) error
ResetForReplay(ctx context.Context, tx Tx, id string) error
ListExpiredLeases(ctx context.Context, limit int) ([]Attachment, error)
ResetLease(ctx context.Context, id string) error
ListStagingToCleanup(ctx context.Context, limit int) ([]Attachment, error)
ClearStagingKey(ctx context.Context, id string) error
}
type OutboxRepository interface {