{"id":13487673,"url":"https://github.com/brickyang/egg-bull","last_synced_at":"2025-04-17T12:43:01.163Z","repository":{"id":57220336,"uuid":"127252876","full_name":"brickyang/egg-bull","owner":"brickyang","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-30T23:33:45.000Z","size":18,"stargazers_count":37,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T14:18:07.249Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brickyang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-29T07:19:57.000Z","updated_at":"2024-03-27T14:35:44.000Z","dependencies_parsed_at":"2022-08-29T00:11:48.389Z","dependency_job_id":null,"html_url":"https://github.com/brickyang/egg-bull","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brickyang%2Fegg-bull","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brickyang%2Fegg-bull/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brickyang%2Fegg-bull/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brickyang%2Fegg-bull/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brickyang","download_url":"https://codeload.github.com/brickyang/egg-bull/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249342148,"owners_count":21254230,"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-07-31T18:01:01.893Z","updated_at":"2025-04-17T12:43:01.145Z","avatar_url":"https://github.com/brickyang.png","language":"JavaScript","funding_links":[],"categories":["Plugins","仓库"],"sub_categories":["插件"],"readme":"[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![David deps][david-image]][david-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/egg-bull-queue.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/egg-bull-queue\n[travis-image]: https://img.shields.io/travis/brickyang/egg-bull.svg?style=flat-square\n[travis-url]: https://travis-ci.org/brickyang/egg-bull\n[codecov-image]: https://img.shields.io/codecov/c/github/brickyang/egg-bull.svg?style=flat-square\n[codecov-url]: https://codecov.io/github/brickyang/egg-bull?branch=master\n[david-image]: https://img.shields.io/david/brickyang/egg-bull.svg?style=flat-square\n[david-url]: https://david-dm.org/brickyang/egg-bull\n[snyk-image]: https://snyk.io/test/npm/egg-bull/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/egg-bull\n[download-image]: https://img.shields.io/npm/dm/egg-bull-queue.svg?style=flat-square\n[download-url]: https://npmjs.org/package/egg-bull-queue\n\n[中文版](https://github.com/brickyang/egg-bull/blob/master/README.zh_CN.md)\n\nPlugin to handle jobs and messages with [Bull](https://github.com/OptimalBits/bull) in Egg.js.\n\nBull is a fast, reliable, Redis-based queue for Node.\n\n## Install\n\n```bash\n$ npm i egg-bull-queue --save\n```\n\nIf you use TypeScript:\n\n```bash\n$ npm i @types/bull --save-dev\n```\n\n## Usage\n\n```js\n// {app_root}/config/plugin.js\nexports.bull = {  // plugin name is 'bull'\n  enable: true,\n  package: 'egg-bull-queue', // package name is 'egg-bull-queue'\n};\n```\n\n## Configuration\n\n### Single queue\n\n```js\n// {app_root}/config/config.default.js\nexports.bull = {\n  client: {\n    name: 'queue',\n    redis: {\n      host: 'localhost',\n      port: 6379,\n      db: 0,\n    },\n  },\n};\n```\n\n### Multiple queue (recommended)\n\n```js\nexports.bull = {\n  clients: {\n    q1: { name: 'q1' },\n    q2: { name: 'q2' },\n  },\n  default: {\n    redis: {\n      host: 'localhost',\n      port: 6379,\n      db: 0,\n    },\n  },\n};\n```\n\n## Example\n\n```js\napp.bull.process(job =\u003e {\n  console.log(job.data, job1); // 'this is a job'\n});\n\napp.bull.add({ job1: 'this is a job' });\n```\n\nFor Bull's api read [Reference](https://github.com/OptimalBits/bull/blob/master/REFERENCE.md#queueclose) for more details.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrickyang%2Fegg-bull","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrickyang%2Fegg-bull","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrickyang%2Fegg-bull/lists"}