Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rsmq-worker

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rsmq-worker - npm Package Compare versions

Comparing version 0.3.6 to 0.3.7

10

example/example.js

@@ -10,8 +10,6 @@ (function() {

worker.on("message", (function(_this) {
return function(msg, next, id) {
console.log("RECEIVED", msg);
next();
};
})(this));
worker.on("message", function(msg, next, id) {
console.log("RECEIVED", msg);
next();
});

@@ -18,0 +16,0 @@ worker.start();

20

example/sender.js

@@ -10,14 +10,12 @@ (function() {

worker.on("ready", (function(_this) {
return function() {
var i, len, msg, ref;
ref = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
for (i = 0, len = ref.length; i < len; i++) {
msg = ref[i];
console.log("SEND", msg);
worker.send(msg);
}
};
})(this));
worker.on("ready", function() {
var i, len, msg, ref;
ref = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
for (i = 0, len = ref.length; i < len; i++) {
msg = ref[i];
console.log("SEND", msg);
worker.send(msg);
}
});
}).call(this);
(function() {
exports.version = '0.3.5';
exports.version = '0.3.7';

@@ -4,0 +4,0 @@ module.exports = require('./lib/rsmq-worker');

@@ -26,2 +26,3 @@ (function() {

timeout: 3000,
alwaysLogErrors: false,
rsmq: null,

@@ -429,3 +430,3 @@ redis: null,

return function(err, msg) {
var _err, _fnNext, _id, timeout;
var _err, _fnNext, _id, ref, timeout;
_this.debug("received", msg);

@@ -471,3 +472,5 @@ if (err) {

_err = _error;
_this.error("error", _err);
if (!((ref = _this.listeners("error")) != null ? ref.length : void 0) || _this.config.alwaysLogErrors) {
_this.error("error", _err);
}
_this.emit("error", _err, msg);

@@ -474,0 +477,0 @@ _fnNext(false);

{
"name": "rsmq-worker",
"version": "0.3.6",
"version": "0.3.7",
"description": "RSMQ helper to simply implement a worker around the message queue",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -62,2 +62,3 @@ ![RSMQ-Worker](https://trello-attachments.s3.amazonaws.com/5481963992d9ba3848568a1b/600x194/61b3b6117eeb0881c919c6996adb2620/rsmq_worker_small.png)

- **options.customExceedCheck**: *( `Function` optional; )* A custom function, with the raw message *(see message format)* as argument to build a custom exceed check. If you return a `true` the message will not exceed. On return `false` the regular check for `maxReceiveCount` will be used.
- **options.alwaysLogErrors**: *( `Boolean` optional; default = `false` )* An error will be logged to the console even if an error listener has been attached.
- **options.rsmq**: *( `RedisSMQ` optional; default = `null` )* A already existing rsmq instance to use instead of creating a new client

@@ -290,3 +291,4 @@ - **options.redis**: *( `RedisClient` optional; default = `null` )* A already existing redis client instance to use if no `rsmq` instance has been defined

|:--:|:--:|:--|
|0.3.6|2015-09-02|Updated dependencies; optimized readme (thanks to [Tobias Lidskog](https://github.com/tobli))|
|0.3.7|2015-09-02|Added tests to check the behavior during errors within message processing; Added option `alwaysLogErrors` to prevent console logs if an error event handler was attached. [Issue #3](https://github.com/mpneuried/rsmq-worker/issues/3)|
|0.3.6|2015-09-02|Updated dependencies; optimized readme (thanks to [Tobias Lidskog](https://github.com/tobli) for the [pull #4](https://github.com/mpneuried/rsmq-worker/pull/4))|
|0.3.5|2015-04-27|again ... fixed argument dispatch for `.send()`|

@@ -293,0 +295,0 @@ |0.3.4|2015-04-27|fixed argument dispatch for `.send()` and added optional cb for `.del()`|

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc