feat(attachments): accept uploads through staging and transactional outbox
This commit is contained in:
+2
-11
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user