Edit workflow and serverless throttling (#15648)
Serverless: 1000 / min. Workflows: 100 / min. This is a security in case of infinite loops.
This commit is contained in:
+2
-1
@@ -458,8 +458,9 @@ export class ServerlessFunctionService {
|
||||
|
||||
private async throttleExecution(workspaceId: string) {
|
||||
try {
|
||||
await this.throttlerService.throttle(
|
||||
await this.throttlerService.tokenBucketThrottleOrThrow(
|
||||
`${workspaceId}-serverless-function-execution`,
|
||||
1,
|
||||
this.twentyConfigService.get('SERVERLESS_FUNCTION_EXEC_THROTTLE_LIMIT'),
|
||||
this.twentyConfigService.get('SERVERLESS_FUNCTION_EXEC_THROTTLE_TTL'),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user