Skip to content

Commit d9b2302

Browse files
committed
feat: default scale boost
1 parent c7a199f commit d9b2302

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SECURITY_BLOCKING_MAX_TIMEOUT_MS=60000
1919
SECURITY_BLOCKING_POLL_INTERVAL_MS=500
2020

2121
# Workers
22-
WORKER_CONCURRENCY=2
22+
WORKER_CONCURRENCY=300
2323

2424
# LLM / GPT
2525
# Set this to your OpenAI API key to enable GPT based analysis

charts/no-package-malware/templates/api.deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ spec:
7878
value: {{ printf "redis://%s:%d/0" $valkeyHost (int $valkeyPort) | quote }}
7979
- name: REDIS_MODE
8080
value: {{ $redisMode | quote }}
81+
- name: WORKER_CONCURRENCY
82+
value: {{ default 300 .Values.components.api.workerConcurrency | quote }}
8183
- name: REDIS_SENTINEL_MASTER_NAME
8284
value: {{ .Values.valkey.sentinel.masterName | default "mymaster" | quote }}
8385
- name: REDIS_SENTINEL_HOST

charts/no-package-malware/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ components:
170170
api:
171171
replicaCount: 1
172172
resources: {}
173+
# Maximum number of concurrent security scan jobs processed per worker process.
174+
# This is passed to the unified API / workers via the WORKER_CONCURRENCY env var.
175+
workerConcurrency: 300
173176

174177
app:
175178
replicaCount: 1

services/api/src/workers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ async function main(): Promise<void> {
13531353
},
13541354
{
13551355
connection,
1356-
concurrency: Number(process.env.WORKER_CONCURRENCY || 2)
1356+
concurrency: Number(process.env.WORKER_CONCURRENCY || 300)
13571357
}
13581358
);
13591359

0 commit comments

Comments
 (0)