Qonvoy
an extremely minimal task runner
use typescript -_-
const Qonvoy = require('qonvoy')
Qonvoy.init({
redisConnectionString: process.env.REDIS_URL,
retention: 60*60*24
})
var firstItem = await Qonvoy.add('testqueue', {
testing: true,
aTestTask: 1.0
})
var secondItem = await Qonvoy.add('testqueue', {
testing: true,
aTestTask: 2.0
})
var thirdItem = await Qonvoy.add('testqueue', {
testing: true,
aTestTask: 3.0
})
async function processFunc(item: Qonvoy.Item) {
console.log(item.aTestTask)
return true
}
Qonvoy.processOne('testqueue', secondItem, processFunc)
Qonvoy.processNext('testqueue', processFunc)
Qonvoy.processNext('testqueue', processFunc)