ЛР 5 — БВТ2303 — Голиков — на 5 #69

Closed
Maximillan_Mercer wants to merge 46 commits from Maximillan_Mercer/mtusi2026lab5-fork:solution/BVT2303-Golikov into main
Showing only changes of commit 4f3e91e50e - Show all commits
+31
View File
@@ -0,0 +1,31 @@
package worker
import (
"context"
"log"
"time"
"high-loud-apps-labs/internal/domain"
)
type Pipeline struct {
jobs domain.AttachmentJobRepository
store domain.ObjectStorage
variants domain.AttachmentVariantRepository
lease time.Duration
}
func NewPipeline(jobs domain.AttachmentJobRepository, store domain.ObjectStorage, variants domain.AttachmentVariantRepository) *Pipeline {
return &Pipeline{
jobs: jobs,
store: store,
variants: variants,
lease: 5 * time.Minute,
}
}
func (p *Pipeline) Process(ctx context.Context, attachmentID string) error {
log.Printf("worker: получена задача на обработку %s (заглушка)", attachmentID)
// TODO
return nil
}