Closed kadirgun closed 10 hours ago
It's my fault. I should have specified whether the app should be booted or not with the startApp
option when running console commands.
import { BaseCommand } from '@adonisjs/core/ace'
import type { CommandOptions } from '@adonisjs/core/types/ace'
import queue from '@rlanz/bull-queue/services/main'
import TestJob from '../app/jobs/test_job.js'
export default class Test extends BaseCommand {
static commandName = 'queue:test'
static description = ''
static options: CommandOptions = {
startApp: true
}
async run() {
queue.dispatch(TestJob, {})
}
}