https://github.com/compwright/feathers-bee-queue
A Feathers service adapter for Bee-Queue jobs
https://github.com/compwright/feathers-bee-queue
bee-queue feathers-service-adapter feathersjs queue
Last synced: 28 days ago
JSON representation
A Feathers service adapter for Bee-Queue jobs
- Host: GitHub
- URL: https://github.com/compwright/feathers-bee-queue
- Owner: compwright
- License: mit
- Created: 2019-06-26T18:12:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T03:59:41.000Z (about 2 years ago)
- Last Synced: 2025-03-27T14:47:38.642Z (about 2 months ago)
- Topics: bee-queue, feathers-service-adapter, feathersjs, queue
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/feathers-bee-queue
- Size: 509 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/contributing.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-feathersjs - feathers-bee-queue - Feathers service adapter for [Bee-Queue](https://www.npmjs.com/package/bee-queue) jobs (Plugins / Database)
README
# feathers-bee-queue
[](https://travis-ci.org/compwright/feathers-bee-queue)
[](https://codeclimate.com/github/compwright/feathers-bee-queue)
[](https://codeclimate.com/github/compwright/feathers-bee-queue/coverage)
[](https://david-dm.org/compwright/feathers-bee-queue)
[](https://www.npmjs.com/package/feathers-bee-queue)
[](https://github.com/sponsors/compwright)A [Feathers](https://feathersjs.com) service adapter for [Bee-Queue](https://www.npmjs.com/package/bee-queue) jobs.
## Installation
```
npm install --save feathers-bee-queue bee-queue
```## Documentation
### `service([options])`
Returns a new service instance initialized with the given options.
> __Important:__ `feathers-bee-queue` implements the [Feathers Common database adapter API](https://docs.feathersjs.com/api/databases/common.html) and [querying syntax](https://docs.feathersjs.com/api/databases/querying.html).
```js
const queueService = require('feathers-bee-queue');
app.use('/jobs', queueService({ queue, events, paginate, multi }));
```__Options:__
- `queue` - A Bee-Queue queue instance
- `events` (*optional*) - A list of [custom service events](https://docs.feathersjs.com/api/events.html#custom-events) sent by this service. Must be one or more of the following:
- `succeeded`
- `retrying`
- `failed`
- `progress`
- `paginate` (*optional*) - A [pagination object](https://docs.feathersjs.com/api/databases/common.html#pagination) containing a `default` and `max` page size
- `multi` (*optional*) - Allow `create` with arrays and `remove` with `id` `null` to change multiple items. Can be `true` for all methods or an array of allowed methods (e.g. `[ 'remove', 'create' ]`)## Complete Example
Here's an example of a Feathers server that uses `feathers-bee-queue`.
```js
const feathers = require('@feathersjs/feathers');
const queueService = require('feathers-bee-queue');
const Queue = require('bee-queue');// Initialize the application
const app = feathers();// Initialize the plugin
app.use('/my-queue', queueService({
queue: new Queue('my-queue')
}));
```## License
Copyright (c) 2018
Licensed under the [MIT license](LICENSE).