forked from mtusi2026/mtusi2026lab5
fix: enforce pipeline lifecycle limits
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user