feat(attachments): accept uploads through staging and transactional outbox

This commit is contained in:
kk10
2026-11-14 19:52:51 +03:00
parent 4dbbd65bcf
commit 8b0ab5440d
10 changed files with 70 additions and 262 deletions
+2 -11
View File
@@ -99,16 +99,7 @@ func Run() error {
backgroundWG.Go(func() {
runIdempotencyCleanup(backgroundCtx, log, queries, cfg.Server.IdempotencyTTL, idempotencyCleanupInterval)
})
backgroundWG.Go(func() {
runAttachmentCleanup(
backgroundCtx,
log,
queries,
s3Client,
attachmentOrphanGracePeriod,
attachmentCleanupInterval,
)
})
defer func() {
stopBackground()
backgroundWG.Wait()
@@ -118,7 +109,7 @@ func Run() error {
userService := service.NewUserService(queries)
chatService := service.NewChatService(pool, queries)
messageService := service.NewMessageService(pool, queries)
attachmentService := service.NewAttachmentService(queries, s3Client, cfg.S3.MaxUploadBytes, cfg.S3.MaxImagePixels)
attachmentService := service.NewAttachmentService(pool, queries, s3Client, cfg.S3.MaxUploadBytes, cfg.S3.MaxImagePixels)
router := NewRouter(
log,