fix(core): Set more reasonable defaults for scaling mode queue lock (#19059)

This commit is contained in:
Tomi Turtiainen
2025-09-02 09:54:18 +03:00
committed by GitHub
parent 8f6c5445f3
commit 35e4772210
2 changed files with 4 additions and 4 deletions

View File

@@ -62,11 +62,11 @@ class RedisConfig {
class SettingsConfig { class SettingsConfig {
/** How long (in milliseconds) is the lease period for a worker processing a job. */ /** How long (in milliseconds) is the lease period for a worker processing a job. */
@Env('QUEUE_WORKER_LOCK_DURATION') @Env('QUEUE_WORKER_LOCK_DURATION')
lockDuration: number = 30_000; lockDuration: number = 60_000;
/** How often (in milliseconds) a worker must renew the lease. */ /** How often (in milliseconds) a worker must renew the lease. */
@Env('QUEUE_WORKER_LOCK_RENEW_TIME') @Env('QUEUE_WORKER_LOCK_RENEW_TIME')
lockRenewTime: number = 15_000; lockRenewTime: number = 10_000;
/** How often (in milliseconds) Bull must check for stalled jobs. `0` to disable. */ /** How often (in milliseconds) Bull must check for stalled jobs. `0` to disable. */
@Env('QUEUE_WORKER_STALLED_INTERVAL') @Env('QUEUE_WORKER_STALLED_INTERVAL')

View File

@@ -234,8 +234,8 @@ describe('GlobalConfig', () => {
gracefulShutdownTimeout: 30, gracefulShutdownTimeout: 30,
prefix: 'bull', prefix: 'bull',
settings: { settings: {
lockDuration: 30_000, lockDuration: 60_000,
lockRenewTime: 15_000, lockRenewTime: 10_000,
stalledInterval: 30_000, stalledInterval: 30_000,
maxStalledCount: 1, maxStalledCount: 1,
}, },