fix: enforce pipeline lifecycle limits

This commit is contained in:
2026-10-30 13:45:49 +03:00
parent 3835106125
commit aa5d6a6e16
20 changed files with 770 additions and 308 deletions
+5 -3
View File
@@ -169,6 +169,7 @@ func newExperiment(ctx context.Context) (*experiment, func(), error) {
dispatcher, err := outbox.New(repository, broker, nil, outbox.Config{
BatchSize: 32, LeaseDuration: 10 * time.Second, PollInterval: time.Second,
RecoveryInterval: 10 * time.Second, RetryDelay: time.Second,
Retention: 24 * time.Hour, CleanupInterval: time.Hour, CleanupBatchSize: 1000,
})
if err != nil {
pool.Close()
@@ -185,9 +186,10 @@ func newExperiment(ctx context.Context) (*experiment, func(), error) {
slog.New(slog.NewTextHandler(io.Discard, nil)), repository, broker, objects, processor, nil,
worker.Config{
WorkerID: consumer, Concurrency: 1,
LeaseDuration: experimentLease, ProcessingTimeout: time.Second,
ReclaimInterval: experimentLease,
MaxAttempts: maxAttempts, RetryBase: time.Second, RetryMax: 4 * time.Second,
LeaseDuration: experimentLease, HeartbeatInterval: 500 * time.Millisecond,
ProcessingTimeout: time.Second,
ReclaimInterval: experimentLease,
MaxAttempts: maxAttempts, RetryBase: time.Second, RetryMax: 4 * time.Second,
MaxBytes: settings.AttachmentMaxBytes, MaxPixels: settings.AttachmentMaxPixels,
MemoryBytes: settings.MemoryBytes,
},