Open farshadfahimi opened 3 years ago
Hello @farshadfahimi . What version of adonis-queue
are you using and did you follow all the instructions in the instructions.md
file ?
i'm experiencing the same issue with version 0.1.10, followed the instructions in theinstructions.md
.
at first, the queue is working and handling the job just fine, buat after some time it only outputs
@@adonisjs/Queue: [Redis] Queue [high] now ready
I'm running the queue with adonis events as example. did i miss something important?
@alfianazizi can you try to zero out the timeOut
. Also, return true
from the handle() method
Like so:
'use strict'
const Job = use('Job')
class Test extends Job {
constructor(){
super(arguments)
this.timeOut = 0; // seconds: time out for queue
this.retryCount = 0; // number of times to retry
this.retryUntil = 200; // seconds: retry
this.delayUntil = 0; // seconds: delay
}
get queue () {
return 'high'
}
async handle(link, done) {
// ...
console.log(`Job [${this.constructor.name}] - handler called: status=running; id=${this.id} `)
return true;
}
Same issue.
From package.json:
"dependencies": {
"@adonisjs/ace": "^5.0.8",
"@adonisjs/auth": "^3.0.7",
"@adonisjs/bodyparser": "^2.0.5",
"@adonisjs/cors": "^1.0.7",
"@adonisjs/fold": "^4.0.9",
"@adonisjs/framework": "^5.0.9",
"@adonisjs/ignitor": "^2.0.8",
"@adonisjs/lucid": "^6.1.3",
"@adonisjs/mail": "^3.0.10",
"@adonisjs/session": "^1.0.27",
"@adonisjs/shield": "^1.0.8",
"@adonisjs/validator": "^5.0.6",
"adonisjs-queue": "^0.1.10"
}
I have a simple job like below
and simple in my controller just write the code for test the queue
queue.dispatch(new Test())
when this action is call in the console I got the below logbut the handler method is not running and when I'm checking the redis the keys is empty.
the configoration of the queue is default config without any changes.
How should I run the queue ?