Skip to content
A Feathers service adapter for Bee-Queue jobs
JavaScript
Branch: master
Clone or download
Latest commit af46ca9 Aug 31, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
lib
test
.editorconfig
.gitignore
.npmignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
mocha.opts
package-lock.json
package.json

README.md

feathers-bee-queue

Build Status Code Climate Test Coverage Dependency Status Download Status

A Feathers service adapter for 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 and querying syntax.

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 sent by this service. Must be one or more of the following:
    • succeeded
    • retrying
    • failed
    • progress
  • paginate (optional) - A pagination object 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.

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.

You can’t perform that action at this time.