Skip to content

Commit 1d7ae90

Browse files
v0.6.16: bullmq optionality
2 parents 560fa75 + c4f4e6b commit 1d7ae90

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

apps/sim/lib/core/bullmq/connection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { ConnectionOptions } from 'bullmq'
2-
import { env } from '@/lib/core/config/env'
2+
import { env, isTruthy } from '@/lib/core/config/env'
33

44
export function isBullMQEnabled(): boolean {
5-
return Boolean(env.REDIS_URL)
5+
return isTruthy(env.CONCURRENCY_CONTROL_ENABLED) && Boolean(env.REDIS_URL)
66
}
77

88
export function getBullMQConnectionOptions(): ConnectionOptions {

apps/sim/lib/core/config/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ export const env = createEnv({
186186
FREE_PLAN_LOG_RETENTION_DAYS: z.string().optional(), // Log retention days for free plan users
187187

188188
// Admission & Burst Protection
189+
CONCURRENCY_CONTROL_ENABLED: z.string().optional().default('false'), // Set to 'true' to enable BullMQ-based concurrency control (default: inline execution)
189190
ADMISSION_GATE_MAX_INFLIGHT: z.string().optional().default('500'), // Max concurrent in-flight execution requests per pod
190191
DISPATCH_MAX_QUEUE_PER_WORKSPACE: z.string().optional().default('1000'), // Max queued dispatch jobs per workspace
191192
DISPATCH_MAX_QUEUE_GLOBAL: z.string().optional().default('50000'), // Max queued dispatch jobs globally

0 commit comments

Comments
 (0)