stitchng / adonis-queue

An addon/plugin package to provide driver-based job queueing services in AdonisJS 4.0+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Providers missing AdonisJS 4.1

sn0rcha opened this issue · comments

Package version

Adonis JS 4.1 - 0.1.7

Node.js and npm version

9.11.2

Sample Code (to reproduce the issue)

After running adonis install adonisjs-queue I don't have the commands to create jobs, and when I try and run "adonis serve", I'm getting the error Error: Cannot find module 'Queue' after creating the events.js

To fix, I had to manually add:

  'adonisjs-queue/providers/QueueProvider',
  'adonisjs-queue/providers/JobProvider',
  'adonisjs-queue/providers/JobCommandsProvider',

To the providers array. I think you might need to just update the docs.

It also didn't create the "config/queue.js" file.

It's also throwing an error
Error: Cannot call Queue#process twice
when using:

 // dispatch to the "high" priority queue
  await Queue.select('high').andDispatch(new SendNotification(id))

in the events.js file.

Did I miss a step on installation?

Thank you for logging the issue. I have a few questions. I believe somehow missed an installation step.

  1. What operating system are you using ?
  2. Is 9.11.2 the Node version or NPM version ?
  3. Did you check the instructions.md file for complete install instructions ?

Because, everything seems to work fine for me with Adonis 4.1 on Windows / Mac but not Linux. I have reported the matter here but no response till now. This problem doesn't also allow the instructions.js file create the config file as well (on Linux distros ONLY). Maybe a screen shot of your package JSON and your "start" folder contents will help to further unravel this weird behavior.

About the second issue, the problem (Error: Cannot call Queue#process twice) seems to be coming from here. This error has been fixed in the latest release v0.1.8.

Hey There,

I'm using Ubuntu Server and Node v9.11.2 / NPM 6.11.3 - thanks for having a look at the "Cannot call Queue#process twice" :)

Can you update to Node v10 ?

Closing this out since no communication from issuer