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

jqueue

Package Overview
Dependencies
Maintainers
4
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jqueue - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

2

package.json
{
"name": "jqueue",
"version": "0.1.9",
"version": "0.1.10",
"description": "MySQL backed plugable Node.js job queue based on the Beanstalk Job Lifecycle",

@@ -5,0 +5,0 @@ "devDependencies": {

@@ -33,3 +33,3 @@ var Queue = require('./queue');

dataType = 'TEXT';
storageEngine = 'MyISAM';
storageEngine = 'InnoDB';
}

@@ -36,0 +36,0 @@ execQuery('CREATE TABLE IF NOT EXISTS ?? (\

@@ -179,16 +179,28 @@ var callBack = require('./callback');

} else {
connection.beginTransaction(function (err) {
connection.query('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE', function (err) {
if (err) {
cb(err);
} else {
connection.query('SELECT * FROM ?? \
connection.beginTransaction(function (err) {
if (err) {
cb(err);
} else {
connection.query('SELECT * FROM ?? \
WHERE (date_time <= CURRENT_TIMESTAMP AND status = ?) OR (time_to_run IS NOT NULL\
AND time_to_run < CURRENT_TIMESTAMP AND status = ?) ORDER BY priority desc,\
date_time asc LIMIT 1 FOR UPDATE', [queueName, 'ready', 'reserved'], function (error, data) {
var message = data;
if (!error && message && message.length) {
message[0].status = 'reserved';
connection.query('UPDATE ?? SET status = ?, version = ?, \
var message = data;
if (!error && message && message.length) {
message[0].status = 'reserved';
connection.query('UPDATE ?? SET status = ?, version = ?, \
time_to_run = DATE_ADD(CURRENT_TIMESTAMP, INTERVAL ? SECOND) WHERE id = ?',
[queueName, message[0].status, version, timeToRun, message[0].id], function (error) {
[queueName, message[0].status, version, timeToRun, message[0].id], function (error) {
connection.commit(function (err) {
if (!err) {
connection.release();
}
cb(error, message);
});
});
} else {
connection.commit(function (err) {

@@ -200,9 +212,3 @@ if (!err) {

});
});
} else {
connection.commit(function (err) {
if (!err) {
connection.release();
}
cb(error, message);
});

@@ -209,0 +215,0 @@ }

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