Skip to content

refactor: start queue in all environments except the console environment and during start phase#6

Open
thetutlage wants to merge 1 commit into0.xfrom
feat/lazy-start
Open

refactor: start queue in all environments except the console environment and during start phase#6
thetutlage wants to merge 1 commit into0.xfrom
feat/lazy-start

Conversation

@thetutlage
Copy link
Copy Markdown
Member

BREAKING CHANGE: Any custom console commands relying on jobs to be registered with the queue manager will not work. They will have to resolve the queue.manager from the container and explicitly invoke the start method.

Closes: #5

…ent and during start phase

BREAKING CHANGE: Any custom console commands relying on jobs to be registered with the queue
manager will not work. They will have to resolve the queue.manager from the container and
explicitly invoke the start method
@rachhen
Copy link
Copy Markdown

rachhen commented May 2, 2026

I got this error when running node ace queue:scheduler:list

node ace queue:scheduler:list

ℹ Exception: QueueManager is not initialized. Call QueueManager.init() before using it.

 ⁃ at QueueManagerSingleton.use (/Users/apple/Sandbox/adonisjs-queue/node_modules/@boringnode/queue/src/queue_manager.ts:187:13)
 ⁃ at _Schedule.list (/Users/apple/Sandbox/adonisjs-queue/node_modules/@boringnode/queue/src/schedule.ts:109:34)
 ⁃ at QueueSchedulerList.run (/Users/apple/Sandbox/adonisjs-queue/build/commands/queue_scheduler_list.js:28:42)

   23 ┃          const { Schedule } = await import('@boringnode/queue');
   24 ┃          const options = {};
   25 ┃          if (this.status === 'active' || this.status === 'paused') {
   26 ┃              options.status = this.status;
   27 ┃          }
 ❯ 28 ┃          const schedules = await Schedule.list(options);
   29 ┃          if (schedules.length === 0) {
   30 ┃              this.logger.info('No schedules found');
   31 ┃              return;
   32 ┃          }
   33 ┃          const table = this.ui.table();

 ⁃ at async QueueSchedulerList.exec (/Users/apple/Sandbox/adonisjs-queue/node_modules/@adonisjs/core/build/main-DzNXtXg3.js:66:19)
 ⁃ at async #execMain (node_modules/@adonisjs/ace/build/index.js:2184:4)
 ⁃ at async AceProcess.handle (node_modules/@adonisjs/core/build/main-zFY2qkGC.js:89:3)

I'm using npm link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@adonisjs/queue eagerly loads jobs during migration:run

2 participants