node-red-node-mysql
Advanced tools
Comparing version 0.0.17 to 0.0.18
@@ -109,2 +109,4 @@ | ||
var node = this; | ||
var busy = false; | ||
var status = {}; | ||
node.mydbConfig.on("state", function(info) { | ||
@@ -128,3 +130,3 @@ if (info === "connecting") { node.status({fill:"grey",shape:"ring",text:info}); } | ||
node.error(err,msg); | ||
node.status({fill:"red",shape:"ring",text:"Error"}); | ||
status = {fill:"red",shape:"ring",text:"Error"}; | ||
} | ||
@@ -134,3 +136,3 @@ else { | ||
node.send(msg); | ||
node.status({fill:"green",shape:"dot",text:"OK"}); | ||
status = {fill:"green",shape:"dot",text:"OK"}; | ||
} | ||
@@ -145,7 +147,13 @@ }); | ||
node.error("Database not connected",msg); | ||
node.status({fill:"red",shape:"ring",text:"not yet connected"}); | ||
status = {fill:"red",shape:"ring",text:"not yet connected"}; | ||
} | ||
if (!busy) { | ||
busy = true; | ||
node.status(status); | ||
node.tout = setTimeout(function() { busy = false; node.status(status); },500); | ||
} | ||
}); | ||
node.on('close', function () { | ||
if (node.tout) { clearTimeout(node.tout); } | ||
node.mydbConfig.removeAllListeners(); | ||
@@ -152,0 +160,0 @@ node.status({}); |
{ | ||
"name" : "node-red-node-mysql", | ||
"version" : "0.0.17", | ||
"version" : "0.0.18", | ||
"description" : "A Node-RED node to read and write to a MySQL database", | ||
@@ -5,0 +5,0 @@ "dependencies" : { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11939
150