All Projects → lykmapipo → kue-unique

lykmapipo / kue-unique

Licence: MIT license
Unique job utility for kue

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to kue-unique

Gearmanbundle
GearmanBundle for Symfony2
Stars: ✭ 233 (+913.04%)
Mutual labels:  queue
Data-Structure-Algorithm-Programs
This Repo consists of Data structures and Algorithms
Stars: ✭ 464 (+1917.39%)
Mutual labels:  queue
qless-php
PHP Bindings for qless
Stars: ✭ 25 (+8.7%)
Mutual labels:  queue
Task Easy
A simple, customizable, and lightweight priority queue for promises.
Stars: ✭ 244 (+960.87%)
Mutual labels:  queue
yii2-deferred-tasks
Yii2 extension for handling deferred tasks (background cron jobs)
Stars: ✭ 11 (-52.17%)
Mutual labels:  queue
owl
A high-performance, Redis-backed job queueing library originally built for Quirrel. Has an in-memory mode for development use cases.
Stars: ✭ 83 (+260.87%)
Mutual labels:  queue
Wx Promise Request
解决微信小程序 wx.request 请求的并发数限制、不支持异步问题
Stars: ✭ 226 (+882.61%)
Mutual labels:  queue
fs
[READ-ONLY] Enterprise queue solutions for PHP. Filesystem transport.
Stars: ✭ 32 (+39.13%)
Mutual labels:  queue
microq
Micro job queue built on mongo
Stars: ✭ 67 (+191.3%)
Mutual labels:  queue
Arduino-Queue.h
Generic C++ circular queue for Arduino embedded projects.
Stars: ✭ 59 (+156.52%)
Mutual labels:  queue
flask-redis-docker
A minimal template for dockerized flask app with redis task queue
Stars: ✭ 49 (+113.04%)
Mutual labels:  queue
dispatcher
Dispatcher is an asynchronous task queue/job queue based on distributed message passing.
Stars: ✭ 60 (+160.87%)
Mutual labels:  queue
yii2-queue-monitor
Yii2 Queue Analytics Module
Stars: ✭ 99 (+330.43%)
Mutual labels:  queue
Specification
OpenMessaging Specification
Stars: ✭ 242 (+952.17%)
Mutual labels:  queue
PyRSMQ
Python Implementation of Redis Simple Message Queue Algorithm
Stars: ✭ 35 (+52.17%)
Mutual labels:  queue
Redis Smq
A simple high-performance Redis message queue for Node.js.
Stars: ✭ 230 (+900%)
Mutual labels:  queue
yii2-mailqueue
Yii2 mail queue component for yii2-swiftmailer.
Stars: ✭ 15 (-34.78%)
Mutual labels:  queue
youtube-dl-nas
youtube download queue websocket server with login for private NAS.
Stars: ✭ 136 (+491.3%)
Mutual labels:  queue
workq
A super tiny work queue
Stars: ✭ 38 (+65.22%)
Mutual labels:  queue
nest-queue
Queue manager for NestJS Framework for Redis (via bull package)
Stars: ✭ 69 (+200%)
Mutual labels:  queue

kue-unique

Build Status Dependencies Status Coverage Status GitHub License

Commitizen Friendly code style: prettier Code Style npm version

Unique job utility for kue. If job already exists it will return it, otherwise it will create a new job and return it.

Requirements

Installation

$ npm install --save kue kue-unique

Usage

import kue from 'kue-unique';
const queue = kue.createQueue();

// create and save unique job
const job = queue.create('email', {
    title: 'welcome email for tj'
  , to: '[email protected]'
  , template: 'welcome-email'
})
.unique(<job_unique_identifier>)
.save((error, job) => {
   if( !error ) {
        console.log( job.id );
    }
});

// removing existing unique job
job.remove( (error, job) => {
   if( !error ) {
        console.log( job.id );
    }
})

Testing

  • Clone this repository

  • Install all development dependencies

npm install
  • Run example
npm run examples
  • Then run test
npm test

Contribute

It will be nice, if you open an issue first so that we can know what is going on, then, fork this repo and push in your ideas. Do not forget to add a bit of test(s) of what value you adding.

License

The MIT License (MIT)

Copyright (c) lykmapipo & Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].