Socket
Socket
Sign inDemoInstall

larvitdbmigration

Package Overview
Dependencies
Maintainers
1
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

larvitdbmigration - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

36

dbMigrations.js

@@ -24,2 +24,20 @@ 'use strict';

function getLock(cb) {
db.query('SELECT running FROM `' + options.tableName + '`;', function(err, rows) {
if (err) {
cb(err);
return;
}
if (parseInt(rows[0].running) === 1) {
log.verbose('larvitdbmigration: Another process is running the migrations, wait and try again soon.');
setTimeout(function() {
getLock(cb);
}, 500);
} else {
cb();
}
});
}
return function(cb) {

@@ -107,20 +125,2 @@ var tasks = [],

tasks.push(function(cb) {
function getLock(cb) {
db.query('SELECT running FROM `' + options.tableName + '`;', function(err, rows) {
if (err) {
cb(err);
return;
}
if (parseInt(rows[0].running) === 1) {
log.verbose('larvitdbmigration: Another process is running the migrations, wait and try again soon.');
setTimeout(function() {
getlock(cb);
}, 500);
} else {
cb();
}
});
}
getLock(function(err) {

@@ -127,0 +127,0 @@ var sql = 'UPDATE `' + options.tableName + '` SET running = 1;';

@@ -33,3 +33,3 @@ {

},
"version": "0.2.3",
"version": "0.2.4",
"readmeFilename": "README.md",

@@ -36,0 +36,0 @@ "scripts": {},

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