{"id":13624316,"url":"https://github.com/pilwon/barbeque","last_synced_at":"2025-04-24T05:18:06.520Z","repository":{"id":11766213,"uuid":"14301550","full_name":"pilwon/barbeque","owner":"pilwon","description":"Redis-based task queue library inspired by Celery and Kue.","archived":false,"fork":false,"pushed_at":"2014-04-29T16:39:20.000Z","size":2653,"stargazers_count":56,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-24T05:17:50.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pilwon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-11T13:32:54.000Z","updated_at":"2023-03-28T05:57:33.000Z","dependencies_parsed_at":"2022-08-31T06:50:44.906Z","dependency_job_id":null,"html_url":"https://github.com/pilwon/barbeque","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilwon%2Fbarbeque","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilwon%2Fbarbeque/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilwon%2Fbarbeque/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilwon%2Fbarbeque/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pilwon","download_url":"https://codeload.github.com/pilwon/barbeque/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250566521,"owners_count":21451234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:01:41.297Z","updated_at":"2025-04-24T05:18:06.503Z","avatar_url":"https://github.com/pilwon.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![Logo](https://raw.github.com/pilwon/barbeque/master/logo.jpg)](http://en.wikipedia.org/wiki/Barbecue)\n\n[![NPM](https://nodei.co/npm/barbeque.png?downloads=false\u0026stars=false)](https://npmjs.org/package/barbeque) [![NPM](https://nodei.co/npm-dl/barbeque.png?months=6)](https://npmjs.org/package/barbeque)\n\n\n# Barbeque for Node.js\n\n`Barbeque` is [Redis](http://redis.io)-based task queue library for [Node.js](http://nodejs.org/), inspired by [Celery](http://www.celeryproject.org) and [Kue](https://github.com/LearnBoost/kue).\n\n\n## Installation\n\n    $ npm install barbeque\n\n\n## Usage\n\n```js\nvar config = {\n  // host: 'localhost'\n  // port: 6379,\n  // namespace: 'test'\n}\n```\n\n### Worker\n\n```js\nvar Barbeque = require('barbeque'),\n    bbq = new Barbeque(config);\n\nbbq.process('add', function (task, done) {\n  done(null, task.data.x + task.data.y);\n});\n\n//--\u003e New worker created that process `add` tasks.\n```\n\n### Task\n\n```js\nvar Barbeque = require('barbeque'),\n    bbq = new Barbeque(config);\n\nbbq.create('add', {\n  x: 2,\n  y: 3\n}).save();\n\n//--\u003e New task saved to Redis DB and notified workers.\n```\n\n### Admin UI\n\n```js\nvar Barbeque = require('barbeque'),\n    bbq = new Barbeque();\n\nbbq.admin();\n```\n\n\n* [See more comprehensive examples here.](https://github.com/pilwon/barbeque/tree/master/examples)\n\n\n## API\n\n```js\n.admin()                   // start admin UI\n.create(type, data)        // create an instance of Task\n.listen()                  // listen to redis updates\n.process(type, processfn)  // start a processor of a specific task type\n.processAll(obj)           // obj: {key:type,val:data} and nestable\n.query(query, cb)          // query: string id, array of string ids, or filter object\n.queryDetail(query, cb)    // query: string id, array of string ids, or filter object\n.run(processFn, data, cb)  // immediately run a task\n.update(taskId, task, cb)  // update task\n```\n\n### Task\n\n```js\n.save(optionalCallback)    // enqueue task to the task queue\n.priority(priority)        // specify task priority (lower value: higher priority)\n.ttl(ttl)                  // auto-expire task (in ms)\n```\n\n### Worker Events\n\n```js\n.on('error', function (err))\n.on('active', function (task))\n.on('processing', function (task))\n.on('complete', function (task))\n.on('failed', function (task))\n.on('inactive', function (task))\n.on('log', function (task, msg))\n.on('progress', function (task, percent))\n```\n\n\n## Credits\n\n  See the [contributors](https://github.com/pilwon/barbeque/graphs/contributors).\n\n\n## License\n\n\u003cpre\u003e\nThe MIT License (MIT)\n\nCopyright (c) 2013-2014 Pilwon Huh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\u003c/pre\u003e\n\n[![Analytics](https://ga-beacon.appspot.com/UA-47034562-2/barbeque/readme?pixel)](https://github.com/pilwon/barbeque)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilwon%2Fbarbeque","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpilwon%2Fbarbeque","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilwon%2Fbarbeque/lists"}