Add throttling on workflow execution (#9263)

We want to avoid infinite loops using workflows. Adding a throttler with
a limit of 10 executions / sec by default for each workflow.

We were not emitting events on workflow actions so loops could not
happen. Since throttler is there we can now and these.

Adding an error message so the user knows when it happens.
<img width="1284" alt="Capture d’écran 2024-12-27 à 17 05 20"
src="https://github.com/user-attachments/assets/dafa837b-5b4c-48be-8207-c90f5c71a236"
/>
This commit is contained in:
Thomas Trompette
2024-12-30 10:52:33 +01:00
committed by GitHub
parent ba2f55a627
commit c52a4924b9
10 changed files with 215 additions and 25 deletions

View File

@ -485,6 +485,13 @@ export class EnvironmentVariables {
@CastToPositiveNumber()
SERVERLESS_FUNCTION_EXEC_THROTTLE_TTL = 1000;
@CastToPositiveNumber()
WORKFLOW_EXEC_THROTTLE_LIMIT = 10;
// milliseconds
@CastToPositiveNumber()
WORKFLOW_EXEC_THROTTLE_TTL = 1000;
// SSL
@IsString()
@IsOptional()