feat(lab5): time pipeline stages and centralize variant constants

This commit is contained in:
Mikhail Verkovykh
2026-11-20 19:05:27 +03:00
parent 1ce93185af
commit d0f533b371
5 changed files with 121 additions and 36 deletions
+11 -1
View File
@@ -22,6 +22,16 @@ const (
// the slack between the global HTTP body limit and the upload limit, so a
// smaller MAX_UPLOAD_BYTES cannot strangle JSON requests.
MaxJSONBodyBytes = 1 * 1024 * 1024
// Image variant parameters. The validator and the worker must agree on the
// contract dimensions, and the experiment records these values, so they
// have exactly one definition.
ThumbnailMax = 256
CropSize = 128
OptimizedMax = 1280
JPEGQuality = 85
WebPQuality = 82
WebPMethod = 4
)
type Config struct {
@@ -63,7 +73,7 @@ type Config struct {
ReconcileGrace time.Duration
ReconcileInterval time.Duration
// Lab5 asynchronous pipeline. BrokerURL is required by the API (outbox
// BrokerURL is required by the API (outbox
// publisher) and the worker (consumer), but not by the reconciler.
BrokerURL string
WorkerOnly bool