forked from mtusi2026/mtusi2026lab5
feat(lab5): durable async attachment pipeline through grade 4
- RabbitMQ quorum queue, persistent messages and publisher confirms - S3 staging plus PostgreSQL attachments/jobs outbox transaction - worker variants (thumbnail, crop, optimized WebP), DB lease and lease sweeper - jittered retry, permanent failures, explicit replay and admission cap - deterministic crash hooks, resilience script and evidence for grade 4 - async-aware custom tests, oversized pixel case, docs and changelog
This commit is contained in:
+3
-4
@@ -20,12 +20,9 @@ import (
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/middleware/recover"
|
||||
"github.com/gofiber/fiber/v3/middleware/requestid"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
func New(cfg config.Config, pool *pgxpool.Pool, sessions *session.Store) (*fiber.App, error) {
|
||||
st := store.New(pool, cfg.DBTimeout, cfg.IdempotencyTTL)
|
||||
|
||||
func New(cfg config.Config, st *store.Store, sessions *session.Store) (*fiber.App, error) {
|
||||
objects, err := objectstore.New(objectstore.Config{
|
||||
Endpoint: cfg.S3Endpoint,
|
||||
Region: cfg.S3Region,
|
||||
@@ -74,6 +71,8 @@ func New(cfg config.Config, pool *pgxpool.Pool, sessions *session.Store) (*fiber
|
||||
attachments.NewValidator(cfg.MaxImagePixels, cfg.ImageDecodeBytes),
|
||||
cfg.MaxUploadBytes,
|
||||
cfg.UploadDrainLimit,
|
||||
cfg.MaxPendingJobs,
|
||||
cfg.JobMaxAttempts,
|
||||
cfg.UploadTimeout,
|
||||
cfg.DownloadTimeout,
|
||||
cfg.UploadTempDir,
|
||||
|
||||
Reference in New Issue
Block a user