node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »



async_job is a work in progress. It is a similar implementation to the ruby library called resque, but isn't an exact copy.

Run async_job init to create the config files

> async_job init
Generating async_job config

Run async_job generate workerName to a new worker in your worker directory

> async_job generate workerName
Generating async_job worker
What a job looks like:

Export a function called perform that the runner can call. Your function will receive two arguments, args and exit, use the args to pass varibles to your work and call exit(0) (Or whateve exit code is appropriate) when your task is finished.

exports.perform = function(args, exit) {

Run async_job like this.

async_job -c 8