feat(worker): create pipeline skeleton

This commit is contained in:
Голиков Maximillian Антон
2026-11-08 15:21:12 +03:00
parent d235c82b39
commit 4f3e91e50e
+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
}