
Product
Introducing the Alert Details Page: A Better Way to Explore Alerts
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.
todo-queue
Advanced tools
queue work todo in redis and handle it in the same process. keep work safe from process restarts/crashes
queue work to do in redis, and handle it in the same process. keep work safe from process restarts/crashes
var todoQueue = require('todo-queue')
var queue = todoQueue({
prefix:"foo",
start:true,
},function(job,done){
//job.name
//job.data
console.log(job)
// all done.
done()
})
queue.add('name',{a:1})
queue = todoQueue(options,doJobFunction)
options
redis
prefix||name
prefix + ':data' hash with the job objects. keyed by name.prefix + ':set' a sorted list of jobs. sorted by time insertedprefix + ':failed' a hash of jobs that have failed along with an error property keyed by timstamp:jobnametimeout
doJobFunction can run without calling doneretry
3attempts
5backoffbackoff
one minute * attempts * 2start
truedoJobFunction(job,done)
job
{name: job name, data: the data you passed into add}done(err, data, skip)
err the job will be retried depending on your settings for attempts and retriesreturn
queuequeue.add(name,data[,delay],cb)
queue.has(name,cb)
queue.start()
options.start is not truthy or you called queue.end and want to continuequeue.stop()
queue.locks(name)
lock on the name.queue.backoff(job)
queue.countFailures(cb)
queue.getFailures(cb)
queue.removeFailure(key,cb)
queue.on(EVENT)
the queue is an event emitter and emits some useful metrics.
queue.on('metric',metric object)
{name:name,value:value}{name: 'job', value: ms}
{name: 'job-retry'}
{name: 'job-failed'}
{name: 'redis-connected'}
{name: 'redis-disconnected'}
{name: 'redis-error'}
{name: 'redis-command-error'}
queue.on("idle")
queue.on("fail",failed job)
queue.on("log",log string)
FAQs
queue work todo in redis and handle it in the same process. keep work safe from process restarts/crashes
We found that todo-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.