feat(domain): lab5 add queued/processing statuses and job fields on Attachment
This commit is contained in:
@@ -40,9 +40,12 @@ type Session struct {
|
|||||||
type AttachmentStatus string
|
type AttachmentStatus string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
AttachmentStatusPending AttachmentStatus = "pending"
|
// Удалим в Этапе 2 вместе с переходом upload на 202/queued.
|
||||||
AttachmentStatusReady AttachmentStatus = "ready"
|
AttachmentStatusPending AttachmentStatus = "pending"
|
||||||
AttachmentStatusFailed AttachmentStatus = "failed"
|
AttachmentStatusQueued AttachmentStatus = "queued"
|
||||||
|
AttachmentStatusProcessing AttachmentStatus = "processing"
|
||||||
|
AttachmentStatusReady AttachmentStatus = "ready"
|
||||||
|
AttachmentStatusFailed AttachmentStatus = "failed"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Attachment struct {
|
type Attachment struct {
|
||||||
@@ -58,4 +61,10 @@ type Attachment struct {
|
|||||||
ErrorCode *string
|
ErrorCode *string
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
UpdatedAt time.Time
|
UpdatedAt time.Time
|
||||||
|
|
||||||
|
Attempts int // авторитетный счётчик попыток (в БД)
|
||||||
|
NextAttemptAt *time.Time // «не раньше»; nil = можно брать сразу
|
||||||
|
LockedUntil *time.Time // lease; nil = не арендовано
|
||||||
|
PipelineVersion int // guard в CompleteJob; в БД default 1
|
||||||
|
StagingKey string // S3-ключ оригинала до 202; "" в lab4-пути
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user