feat(service): lab5 switch upload to queued and write to transactional outbox

This commit is contained in:
Голиков Maximillian Антон
2026-11-07 09:54:11 +03:00
parent 0fddc697f1
commit 6eaf2a89b0
3 changed files with 53 additions and 51 deletions
+1 -3
View File
@@ -40,8 +40,6 @@ type Session struct {
type AttachmentStatus string
const (
// Удалим в Этапе 2 вместе с переходом upload на 202/queued.
AttachmentStatusPending AttachmentStatus = "pending"
AttachmentStatusQueued AttachmentStatus = "queued"
AttachmentStatusProcessing AttachmentStatus = "processing"
AttachmentStatusReady AttachmentStatus = "ready"
@@ -63,7 +61,7 @@ type Attachment struct {
UpdatedAt time.Time
Attempts int // авторитетный счётчик попыток (в БД)
NextAttemptAt *time.Time // «не раньше»; nil = можно брать сразу
NextAttemptAt *time.Time // "не раньше"; nil = можно брать сразу
LockedUntil *time.Time // lease; nil = не арендовано
PipelineVersion int // guard в CompleteJob; в БД default 1
StagingKey string // S3-ключ оригинала до 202; "" в lab4-пути