New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

long-task-queue-reader

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

long-task-queue-reader - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

lib/keepAliveMessage.js

2

lib/azure/queue.js

@@ -52,3 +52,3 @@ (function() {

return this.client.deleteMessageAsync(this.queueName, messageId, popReceipt).tap(function() {
return "Removed messageId: " + messageId;
return debug("Removed messageId: " + messageId);
});

@@ -55,0 +55,0 @@ };

(function() {
var EventEmitter, LongTaskQueueReader, Promise, _, convert, eventsToLog, winston,
var EventEmitter, KeepAliveMessage, LongTaskQueueReader, Promise, _, convert, eventsToLog, winston,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },

@@ -17,2 +17,4 @@ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },

KeepAliveMessage = require("./keepAliveMessage");
eventsToLog = function(logger) {

@@ -55,5 +57,5 @@ return {

this.runner = runner;
this._timeToTouch = bind(this._timeToTouch, this);
this._touch = bind(this._touch, this);
this._removeSafety = bind(this._removeSafety, this);
this._createKeepAlive = bind(this._createKeepAlive, this);
this._execute = bind(this._execute, this);

@@ -121,9 +123,6 @@ this._nextTimeout = bind(this._nextTimeout, this);

LongTaskQueueReader.prototype._execute = function(message) {
var intervalHandler;
intervalHandler = setInterval(((function(_this) {
return function() {
return _this._touch(message);
};
})(this)), this._timeToTouch());
var keepAliveMessage;
keepAliveMessage = this._createKeepAlive(message);
this.emit("synchronization_start", message);
keepAliveMessage.start();
return new this.MessageExecutor(this.runner, message).execute().tap((function(_this) {

@@ -141,3 +140,3 @@ return function() {

})(this)).tap(function() {
return clearInterval(intervalHandler);
return keepAliveMessage.destroy();
}).then((function(_this) {

@@ -150,2 +149,6 @@ return function() {

LongTaskQueueReader.prototype._createKeepAlive = function(message) {
return new KeepAliveMessage(message, this.visibilityTimeout, this._touch);
};
LongTaskQueueReader.prototype._removeSafety = function(message) {

@@ -178,6 +181,2 @@ return this.queue.remove(message)["catch"]((function(_this) {

LongTaskQueueReader.prototype._timeToTouch = function() {
return convert(this.visibilityTimeout).from("s").to("ms") / 2;
};
return LongTaskQueueReader;

@@ -184,0 +183,0 @@

{
"name": "long-task-queue-reader",
"version": "0.0.6",
"version": "0.0.7",
"description": "long-task-queue-reader",

@@ -32,3 +32,5 @@ "main": "index.js",

"mocha": "3.0.2",
"should": "11.1.0"
"should": "11.1.0",
"should-sinon": "0.0.5",
"sinon": "^1.17.6"
},

@@ -35,0 +37,0 @@ "author": "Parsimotion",

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