{"_id":"coffee-resque","_rev":"48-c1aecae9dc94d1051d00f98a1e4bef6f","name":"coffee-resque","description":"Coffeescript/Node.js port of Resque","dist-tags":{"latest":"0.1.11"},"versions":{"0.0.1":{"name":"coffee-resque","version":"0.0.1","description":"Coffeescript/Node.js port of Resque","keywords":["coffee-resque"],"maintainers":[{"name":"rick","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"}],"repositories":[{"type":"git","url":"https://github.com/technoweenie/coffee-resque.git"}],"engines":{"node":">=0.2.5"},"directories":{"lib":"lib"},"main":"./lib/index","_id":"coffee-resque@0.0.1","_engineSupported":true,"_npmVersion":"0.2.13","_nodeVersion":"v0.3.6","dist":{"shasum":"d6bd84a1cbb26e52bbf43ff9a07e8743551738e2","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.0.1.tgz","integrity":"sha512-o3ROok55Qi2GpXejw/VKTUgDXTnLQ/KCias1HSZd1FX8OmHdp7h6fgmoWz/XSin0tVdY9NpPDbdYpQaGWkyrrg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEMBeMrhr4ZcfMh/aOECjoN1oii+X5gYjyyRlEcb9cSQIgdEQ9qeEiPujdYVU1zqyxugowJhtdQTLLJh34cJHOanU="}]}},"0.1.0":{"name":"coffee-resque","version":"0.1.0","description":"Coffeescript/Node.js port of Resque","keywords":["coffee-resque"],"dependencies":{"redis":">= 0.5.2"},"engines":{"node":">=0.2.6"},"directories":{"lib":"lib"},"main":"./lib/index","_id":"coffee-resque@0.1.0","_engineSupported":true,"_npmVersion":"0.3.7","_nodeVersion":"v0.4.1","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"7e188d06122e7c5c78d9624c0b19f134c346cd20","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.1.0.tgz","integrity":"sha512-XTB+NlBOOP+LlYdg8Mjn6+VzjCM2h5qZICzP5mVaHnlr1YLu9qjSTmaWk6y+D1Woj/fFa3M4aq1oO1eoZrwdWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEH/3imD4P10xiDejBtezIt1pVrhEnmXQ7l8xz5aWEeZAiEA078Ab2HIFzvqgFIffUBTZlzJdKm9gZTXHnSjTv2LYbs="}]}},"0.1.2":{"name":"coffee-resque","version":"0.1.2","description":"Coffeescript/Node.js port of Resque","keywords":["resque","redis","queue","coffee script"],"homepage":"https://github.com/technoweenie/coffee-resque","author":{"name":"Rick Olson","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"},"contributors":[{"name":"Sean McDaniel","email":"sean.mcdaniel@me.com"}],"main":"./lib/index","directories":{"lib":"./lib"},"repository":{"type":"git","url":"git://github.com/technoweenie/coffee-resque.git"},"dependencies":{"redis":">= 0.5.2"},"engines":{"node":">=0.2.6"},"_id":"coffee-resque@0.1.2","_engineSupported":true,"_npmVersion":"0.3.7","_nodeVersion":"v0.4.1","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"1ddc64be6c4cf8b8c93e5a200fb24719fc62f5af","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.1.2.tgz","integrity":"sha512-vFkZ7R/g+yn+BlFdmBvK5GMRM6bXZI4pRB4NviEaJvuQWBcL3dR0f9bpbM3Kouu2BUU2vvUGws5kjz6JEwK7TA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDFI1PpO/W0N8TTfwxsuAcFSr/vdKMx5pHbPwQ68PHIEAiBvdpaFwhuogG5AZKo+iHL/MME92RiKsKbj0mtfCj7E1g=="}]}},"0.1.3":{"name":"coffee-resque","version":"0.1.3","description":"Coffeescript/Node.js port of Resque","keywords":["resque","redis","queue","coffee script"],"homepage":"https://github.com/technoweenie/coffee-resque","author":{"name":"Rick Olson","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"},"contributors":[{"name":"Sean McDaniel","email":"sean.mcdaniel@me.com"}],"main":"./lib/index","directories":{"lib":"./lib"},"repository":{"type":"git","url":"git://github.com/technoweenie/coffee-resque.git"},"dependencies":{"redis":">= 0.5.2"},"engines":{"node":">= 0.2.6"},"devDependencies":{},"_id":"coffee-resque@0.1.3","_engineSupported":true,"_npmVersion":"1.0.1rcFINAL","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"42112dc4e9449c8d8f2c3174564d6a1732ffb057","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.1.3.tgz","integrity":"sha512-d4VjgC4L619nUbtbDlUeB+H4GfhvghnxDX1YiDoAhJm50YOP4ZCoMhAKQEK3YlR6M8GYL+QsTYWxiccwYP6eTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDte9lIcELwoJ0hcQq8uT+53zI5Pf2eVwibLksXHh/gXwIhAJq8lmCTGK9+my2vtqSdTm2+bmRWdpx2BXH7kxem9Fyq"}]},"scripts":{}},"0.1.4":{"name":"coffee-resque","version":"0.1.4","description":"Coffeescript/Node.js port of Resque","keywords":["resque","redis","queue","coffee script"],"homepage":"https://github.com/technoweenie/coffee-resque","author":{"name":"Rick Olson","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"},"contributors":[{"name":"Sean McDaniel","email":"sean.mcdaniel@me.com"}],"main":"./lib/index","directories":{"lib":"./lib"},"repository":{"type":"git","url":"git://github.com/technoweenie/coffee-resque.git"},"dependencies":{"redis":">= 0.5.2"},"engines":{"node":">= 0.2.6"},"devDependencies":{},"_id":"coffee-resque@0.1.4","_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"3ea2a650ace1ee138b4e40b0b3acd4cd81a93300","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.1.4.tgz","integrity":"sha512-EuPPKYLV4nGoc9kLifmrts2ciJG69gs+HxoVkk+dLTDD6yQ62sBRcb7VkU8KgcBSA751OxmSaO1PyprgfLWdzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJdY/TejzOXHLp3mTUq991NLXJJiH5RC/0VRx8zdWujAIhANbNW077+CAKdFTE8PqBe+kePO5RI1kZFkNwvJ09fEiJ"}]},"scripts":{}},"0.1.5":{"name":"coffee-resque","version":"0.1.5","description":"Coffeescript/Node.js port of Resque","keywords":["resque","redis","queue","coffee script"],"homepage":"https://github.com/technoweenie/coffee-resque","author":{"name":"Rick Olson","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"},"contributors":[{"name":"Sean McDaniel","email":"sean.mcdaniel@me.com"}],"main":"./lib/index","directories":{"lib":"./lib"},"repository":{"type":"git","url":"git://github.com/technoweenie/coffee-resque.git"},"dependencies":{"redis":">= 0.5.2"},"engines":{"node":">= 0.2.6"},"_npmUser":{"name":"steelThread","email":"sean.mcdaniel@me.com"},"_id":"coffee-resque@0.1.5","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.4","_nodeVersion":"v0.6.12","_defaultsLoaded":true,"dist":{"shasum":"0e0bbf19956f85e78f828ee013e2bac748bf8cc0","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.1.5.tgz","integrity":"sha512-d1AFxjf8N/9H/RaY/rltIBaE7x0kKsqK1kKqhIo/IDoDopByYIt9GKnON92EQgT6Jt0Z09UjWQSgNnQAjSsbbQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzLyZGDgOuVAjzZFW5Ij3LDob/q9PCyK0+XgoGWLqzxgIgLPUG31uJZj4cTJqDVhqiw14O0aCe0rCf3zmn8NUYtis="}]},"maintainers":[{"name":"technoweenie","email":"technoweenie@gmail.com"},{"name":"steelThread","email":"sean.mcdaniel@me.com"}]},"0.1.6":{"name":"coffee-resque","version":"0.1.6","description":"Coffeescript/Node.js port of Resque","keywords":["resque","redis","queue","coffee script"],"homepage":"https://github.com/technoweenie/coffee-resque","author":{"name":"Rick Olson","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"},"contributors":[{"name":"Sean McDaniel","email":"sean.mcdaniel@me.com"}],"main":"./lib/index","directories":{"lib":"./lib"},"repository":{"type":"git","url":"git://github.com/technoweenie/coffee-resque.git"},"dependencies":{"redis":">= 0.5.2"},"engines":{"node":">= 0.2.6"},"_npmUser":{"name":"steelThread","email":"sean.mcdaniel@me.com"},"_id":"coffee-resque@0.1.6","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.4","_nodeVersion":"v0.6.12","_defaultsLoaded":true,"dist":{"shasum":"550342db12606b227f47407fb9a9699ac258478b","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.1.6.tgz","integrity":"sha512-c0u4PEXB6/BTmP6jfahl3nQjQI6ldeKBSXoRfnsseWG/rPbhhnol2kzgJvC+mFy/dq9foRApACTtjYqLGe/wvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFV60xPkZu2QG926Q2KFIFuMjXev4lYhTMAQh3dEi0yVAiBPaFLjvuyYiRkwyZnftwi3zOKV2OocaWMz23Ma5Ukk8g=="}]},"maintainers":[{"name":"technoweenie","email":"technoweenie@gmail.com"},{"name":"steelThread","email":"sean.mcdaniel@me.com"}]},"0.1.7":{"name":"coffee-resque","version":"0.1.7","description":"Coffeescript/Node.js port of Resque","keywords":["resque","redis","queue","coffee script"],"homepage":"https://github.com/technoweenie/coffee-resque","author":{"name":"Rick Olson","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"},"contributors":[{"name":"Sean McDaniel","email":"sean.mcdaniel@me.com"}],"main":"./lib/index","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/technoweenie/coffee-resque.git"},"dependencies":{"redis":">= 0.5.2"},"engines":{"node":">= 0.2.6"},"_id":"coffee-resque@0.1.7","dist":{"shasum":"35e4a69db53726e8ce7ac44e6cd8c51058e114ca","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.1.7.tgz","integrity":"sha512-2sD57xGMB8FTkQIpppCLLTXDa7RZaeOp86iiDA8zrP+nazM2vQ8e2hn+hkuZSzi1p7Q3mf8DS1DJVEQx8fealQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDM8okEAuCJ2hO6xdRrPta93Lc0JvE4Bw99pVOPi2T3VgIgYlCoHlY1QR/pUCGvO32eRQS3V5IB+YylZxar7DfgmZE="}]},"maintainers":[{"name":"technoweenie","email":"technoweenie@gmail.com"},{"name":"steelThread","email":"sean.mcdaniel@me.com"}]},"0.1.8":{"name":"coffee-resque","version":"0.1.8","description":"Coffeescript/Node.js port of Resque","keywords":["resque","redis","queue","coffee script"],"homepage":"https://github.com/technoweenie/coffee-resque","author":{"name":"Rick Olson","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"},"contributors":[{"name":"Sean McDaniel","email":"sean.mcdaniel@me.com"}],"main":"./lib/index","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/technoweenie/coffee-resque.git"},"dependencies":{"redis":">= 0.5.2"},"engines":{"node":">= 0.2.6"},"_id":"coffee-resque@0.1.8","dist":{"shasum":"b368c696f9fcc71ecd9572a7222b6920a576774c","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.1.8.tgz","integrity":"sha512-iNUGpiojCX9oW5+NCF/Ihc/ldvCorkaqu5lonaiKO10HIJ2LmOe7xLm1JEZnhRnqJ3mxLNP4n4fH0+xDkGyOcg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHsxA9RDs+h6auU5SXWh2BNxHZhxOELqw9sqZdzjROFrAiBU/1BbvT3Da5TEYyzAaHR7UVBNN272t3VaIZNaWdIUSw=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"steelThread","email":"sean.mcdaniel@me.com"},"maintainers":[{"name":"technoweenie","email":"technoweenie@gmail.com"},{"name":"steelThread","email":"sean.mcdaniel@me.com"}]},"0.1.9":{"name":"coffee-resque","version":"0.1.9","description":"Coffeescript/Node.js port of Resque","keywords":["resque","redis","queue","coffee script"],"homepage":"https://github.com/technoweenie/coffee-resque","author":{"name":"Rick Olson","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"},"contributors":[{"name":"Sean McDaniel","email":"sean.mcdaniel@me.com"}],"main":"./lib/index","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/technoweenie/coffee-resque.git"},"dependencies":{"redis":">= 0.5.2"},"engines":{"node":">= 0.2.6"},"scripts":{"postinstall":"echo Update Notes: The worker polling mechanism was changed with this version to make coffee-resque workers behave similar to Ruby Resque workers. Please read about it in the README file."},"_id":"coffee-resque@0.1.9","dist":{"shasum":"f975ab531829eec281927bd87ddbeca69f9cb4fe","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.1.9.tgz","integrity":"sha512-Fb2nkhhsIddOb2grPNy6GmqvD1VGQwYJJnit+80/Ohx/veEYOU6s371xe9Nm/dJe0W5YZGWS+M7V44RxvP/cTw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4DP5ODI5LkBAyYLj+sV28M70gJGK9tQb5bTqUrqg+6AiBnDn3cvceu449x/e4nsfywg1DrSc6YGWp15MutnPTQNw=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"steelThread","email":"sean.mcdaniel@me.com"},"maintainers":[{"name":"technoweenie","email":"technoweenie@gmail.com"},{"name":"steelThread","email":"sean.mcdaniel@me.com"}]},"0.1.11":{"name":"coffee-resque","version":"0.1.11","description":"Coffeescript/Node.js port of Resque","keywords":["resque","redis","queue","coffee script"],"homepage":"https://github.com/technoweenie/coffee-resque","author":{"name":"Rick Olson","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"},"contributors":[{"name":"Sean McDaniel","email":"sean.mcdaniel@me.com"}],"main":"./lib/index","directories":{"lib":"./lib"},"repository":{"type":"git","url":"https://github.com/technoweenie/coffee-resque.git"},"dependencies":{"redis":">= 0.5.2"},"engines":{"node":">= 0.2.6"},"scripts":{"postinstall":"echo Update Notes: Connection#enqueue now accepts an optional callback."},"bugs":{"url":"https://github.com/technoweenie/coffee-resque/issues"},"_id":"coffee-resque@0.1.11","dist":{"shasum":"47eed7dc06917ffc192f4d345dab748e2587efa0","tarball":"https://registry.npmjs.org/coffee-resque/-/coffee-resque-0.1.11.tgz","integrity":"sha512-9iu60kgF1+KzHXfU8Y5b/jpOiikbGo1Atc+E+ZzsLwVgcxDIVw2kMl0AbfmxJgno35mLc0Ljn20J1P9qUinh0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAVe6jaUH2auc0lEvd6tfrJd3iLd82msQfZaEHzaaP8dAiA2wjejk/V/qLxmrT2MVoCREuimaGrj8IGaa87st07hFw=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"steelThread","email":"sean.mcdaniel@me.com"},"maintainers":[{"name":"technoweenie","email":"technoweenie@gmail.com"},{"name":"steelThread","email":"sean.mcdaniel@me.com"}]}},"maintainers":[{"name":"technoweenie","email":"technoweenie@gmail.com"},{"name":"steelThread","email":"sean.mcdaniel@me.com"}],"time":{"modified":"2022-06-13T06:27:50.146Z","created":"2011-02-01T03:35:19.293Z","0.0.1":"2011-02-01T03:35:19.510Z","0.1.0":"2011-02-24T16:43:23.300Z","0.1.2":"2011-03-09T23:13:45.866Z","0.1.3":"2011-04-28T00:56:45.509Z","0.1.4":"2011-05-14T16:57:35.139Z","0.1.5":"2012-04-03T16:19:16.571Z","0.1.6":"2012-06-14T00:59:39.233Z","0.1.7":"2012-07-25T00:31:11.793Z","0.1.8":"2012-10-30T14:33:17.985Z","0.1.9":"2013-07-05T23:34:27.614Z","0.1.10":"2014-04-29T00:29:44.043Z","0.1.11":"2014-04-29T15:51:49.280Z"},"author":{"name":"Rick Olson","email":"technoweenie@gmail.com","url":"http://techno-weenie.net"},"repository":{"type":"git","url":"https://github.com/technoweenie/coffee-resque.git"},"users":{"fgribreau":true},"readme":"# Coffee-Resque\n\nCoffeescript/Node.js port of Resque.\n\n## USAGE\n\nFirst, you'll want to queue some jobs in your app:\n\n```javascript\nvar resque = require('coffee-resque').connect({\n  host: redisHost,\n  port: redisPort\n});\nresque.enqueue('math', 'add', [1,2], function(err, remainingJobs) {\n  console.log('New job queued. Remaining jobs in queue: ' + remainingJobs);\n});\n```\n\nNext, you'll want to setup a worker to handle these jobs.   \n\nUpon completion of the job, invoke the passed callback with a result \n(if a result was produced by the job) or an `Error` (if an error was\nencountered).  If an `Error` is received, resque fails the\njob. In all other cases resque assumes the job is successful.\n\nThe callback is important—it notifies resque that the worker\nhas completed the current job and is ready for another. Neglecting to \ninvoke the callback will result in worker starvation.\n\n```javascript\n// implement your job functions.\nvar myJobs = {\n  add: function(a, b, callback) { callback(a + b); },\n  succeed: function(arg, callback) { callback(); },\n  fail: function(arg, callback) { callback(new Error('fail')); }\n}\n\n// setup a worker\nvar worker = require('coffee-resque').connect({\n  host: redisHost,\n  port: redisPort\n}).worker('*', myJobs)\n\n// some global event listeners\n//\n// Triggered every time the Worker polls.\nworker.on('poll', function(worker, queue) {})\n\n// Triggered before a Job is attempted.\nworker.on('job', function(worker, queue, job) {})\n\n// Triggered every time a Job errors.\nworker.on('error', function(err, worker, queue, job) {})\n\n// Triggered on every successful Job run.\nworker.on('success', function(worker, queue, job, result) {})\n\nworker.start()\n```\n\n## Worker Polling Mechanism\n\nAs of v0.1.9, workers poll the given queues similar to [Ruby Resque](https://github.com/resque/resque):\n\n```\nstart\nloop do\n  if job = reserve\n    job.process\n  else\n    sleep 5 # Polling frequency = 5\n  end\nend\nshutdown\n```\n\nThis ensures that multiple queues are polled in the priority mentioned.  Eg: If a worker is started on \"queue1,queue2\",\nqueue1 is drained completely before jobs in queue2 are processed.\n\nPrior to v0.1.9, workers used to poll the queues in a round-robin fashion.\n\n## Development\n\nAll code is written in Coffee Script and converted to javascript as it's\npublished to npm.\n\nFor normal development, all you need to be concerned about is testing:\n\n```bash\n$ make test\n```\n\nIf you need to generate javascript for production purposes and don't want to use npm packages, you can use:\n\n```bash\n$ make generate-js\n$ make remove-js\n```\n\nYou can also have coffeescript watch the `src` directory and generate Javascript files as they're updated.\n\n```bash\n$ make dev\n```\n\n## TODO\n\n* Generic failure handling\n* Better polling\n","homepage":"https://github.com/technoweenie/coffee-resque","keywords":["resque","redis","queue","coffee script"],"contributors":[{"name":"Sean McDaniel","email":"sean.mcdaniel@me.com"}],"readmeFilename":"README.md","bugs":{"url":"https://github.com/technoweenie/coffee-resque/issues"}}