Skip to content

Commit 208c9e4

Browse files
committed
Change how the run queue master queue consumers are disabled internally
1 parent 02f7af7 commit 208c9e4

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

apps/webapp/app/v3/runEngine.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function createRunEngine() {
6363
processWorkerQueueDebounceMs: env.RUN_ENGINE_PROCESS_WORKER_QUEUE_DEBOUNCE_MS,
6464
dequeueBlockingTimeoutSeconds: env.RUN_ENGINE_DEQUEUE_BLOCKING_TIMEOUT_SECONDS,
6565
masterQueueConsumersIntervalMs: env.RUN_ENGINE_MASTER_QUEUE_CONSUMERS_INTERVAL_MS,
66+
masterQueueConsumersDisabled: env.RUN_ENGINE_WORKER_ENABLED === "0",
6667
},
6768
runLock: {
6869
redis: {

internal-packages/run-engine/src/engine/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class RunEngine {
123123
shutdownTimeoutMs: options.worker.shutdownTimeoutMs,
124124
},
125125
shardCount: options.queue?.shardCount,
126-
masterQueueConsumersDisabled: options.worker.disabled,
126+
masterQueueConsumersDisabled: options.queue?.masterQueueConsumersDisabled,
127127
masterQueueConsumersIntervalMs: options.queue?.masterQueueConsumersIntervalMs,
128128
processWorkerQueueDebounceMs: options.queue?.processWorkerQueueDebounceMs,
129129
dequeueBlockingTimeoutSeconds: options.queue?.dequeueBlockingTimeoutSeconds,

internal-packages/run-engine/src/engine/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export type RunEngineOptions = {
3131
queue: {
3232
redis: RedisOptions;
3333
shardCount?: number;
34+
masterQueueConsumersDisabled?: boolean;
3435
processWorkerQueueDebounceMs?: number;
3536
masterQueueConsumersIntervalMs?: number;
3637
workerOptions?: WorkerConcurrencyOptions;

0 commit comments

Comments
 (0)