Skip to content

Commit 48e7295

Browse files
x246019x246019
authored andcommitted
falls back to original env var used if the new do not exist
1 parent c87585c commit 48e7295

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/flavors/circuitbreaker.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const toUpdateRequest = (opt) => faulty((uow) => ({
1515
UUID: process.env.ESM_ID, // Ref: TriggerEventSourceMappingDynamodbEntitiesTable
1616
Enabled: uow.event.alarmData.state.value !== 'ALARM',
1717
BatchSize: uow.event.alarmData.state.value === 'INSUFFICIENT_DATA'
18-
? 1 : Number(opt.circuitBreakerMaxBatchSize) || Number(process.env.CIRCUIT_BREAKER_MAX_BATCH_SIZE) || 100,
18+
? 1 : Number(opt.circuitBreakerMaxBatchSize)
19+
|| Number(process.env.CIRCUIT_BREAKER_MAX_BATCH_SIZE)
20+
|| Number(process.env.BATCH_SIZE)
21+
|| 100,
1922
},
2023
}));

0 commit comments

Comments
 (0)