Solid queue
Redis-backed durable job queue for Solid CI.
API
Queue()
Initialize a new Queue
.
Queue.clear(fn:Function)
Clear job queue data.
Queue.sub([fn]:Function)
Subscribe to events.
var queue = ; queue; queue queue
Events
push
(job)abort
(job)fail
(job, err)complete
(job)processing
(job)
Queue.push(job:String, fn:Function)
Push job
and invoke fn(err)
.
Queue.pop(fn:Function)
Perform a blocking pop to fetch a job and invoke fn(err, job)
.
Queue.fail(job:String, error:Error, [fn]:Function)
Abort job
with the given error
object.
Queue.abort(job:String, [fn]:Function)
Abort job
.
Queue.complete(job:String, [fn]:Function)
Complete job
.
Queue.stats(fn:Function)
Get queue statistics and invoke fn(err, stats)
.
total
number of jobs totalcount
number of pending jobsprocessing
number of processing jobs
License
MIT