-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hello there,
Thanks again for this package but I configured it like this:
import env from '#start/env'
import app from '@adonisjs/core/services/app'
import { exponentialBackoff } from '@boringnode/queue'
import { redis } from '@boringnode/queue/drivers/redis_adapter'
import { sync } from '@boringnode/queue/drivers/sync_adapter'
import { type QueueManagerConfig } from '@boringnode/queue/types'
const queueConfig: QueueManagerConfig = {
default: env.get('QUEUE_CONNECTION'),
adapters: {
sync: sync(),
redis: redis({
host: env.get('REDIS_HOST'),
port: env.get('REDIS_PORT'),
password: env.get('REDIS_PASSWORD', ''),
db: env.get('REDIS_DB', 0),
keyPrefix: env.get('REDIS_KEY_PREFIX', 'flowshub:'),
retryStrategy: (times) => (times > 10 ? null : times * 50),
}),
},
retry: {
maxRetries: 3,
backoff: exponentialBackoff({
baseDelay: '1s',
maxDelay: '1m',
multiplier: 2,
jitter: true,
}),
},
worker: {
timeout: env.get('QUEUE_TIMEOUT', '24h'),
concurrency: env.get('QUEUE_CONCURRENCY', 20),
idleDelay: env.get('QUEUE_IDLE_DELAY', '2s'),
},
defaultJobOptions: {
removeOnComplete: false,
removeOnFail: false,
},
locations: ['./app/jobs/**/*.{js,ts}'],
jobFactory: async (JobClass) => {
return app.container.make(JobClass)
},
}
export default queueConfigBut jobs are still waiting for the current one to complete before starting, even though I have a concurrency limit of 20:

Metadata
Metadata
Assignees
Labels
No labels