Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including async_job with all npm packages installed. Try it out:

var asyncJob = require("async_job")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

async_job v0.0.6

resque knock off written for redis and node.js

async_job

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) {
  console.log(args)

  exit(0)
}

Run async_job like this.

async_job -c 8

License

MIT

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free