A Feathers service adapter for Bee-Queue jobs.
npm install --save feathers-bee-queue bee-queue
Returns a new service instance initialized with the given options.
Important:
feathers-bee-queueimplements 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 instanceevents(optional) - A list of custom service events sent by this service. Must be one or more of the following:succeededretryingfailedprogress
paginate(optional) - A pagination object containing adefaultandmaxpage sizemulti(optional) - Allowcreatewith arrays andremovewithidnullto change multiple items. Can betruefor all methods or an array of allowed methods (e.g.[ 'remove', 'create' ])
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')
}));Copyright (c) 2018
Licensed under the MIT license.
