mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
reduce *MaxKeptMsgsCount property to one maxKeptMsgsCount (#1563)
This commit is contained in:
parent
da4a0f09ed
commit
a75b819858
@ -156,7 +156,7 @@
|
|||||||
<p>If <b>repair sequence (reconstruct parts property of outgoing messages)</b> checkbox is selected, <code>msg.parts</code> property are reconstructed for each port to make forks of valid sequences. Otherwise, <code>msg.parts</code> property of incoming messages are passed through.</p>
|
<p>If <b>repair sequence (reconstruct parts property of outgoing messages)</b> checkbox is selected, <code>msg.parts</code> property are reconstructed for each port to make forks of valid sequences. Otherwise, <code>msg.parts</code> property of incoming messages are passed through.</p>
|
||||||
|
|
||||||
<h3>Note:</h3>
|
<h3>Note:</h3>
|
||||||
<p>This node internally keeps messages for its operation if <b>repair sequence</b> checkbox is ON. In order to prevent unexpected memory usage, maximum number of messages kept can be specified by <code>switchMaxKeptMsgsCount</code> property in <b>settings.js</b>.</p>
|
<p>This node internally keeps messages for its operation if <b>repair sequence</b> checkbox is ON. In order to prevent unexpected memory usage, maximum number of messages kept can be specified by <code>maxKeptMsgsCount</code> property in <b>settings.js</b>.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -53,7 +53,7 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
function max_kept_msgs_count(node) {
|
function max_kept_msgs_count(node) {
|
||||||
if (_max_kept_msgs_count === undefined) {
|
if (_max_kept_msgs_count === undefined) {
|
||||||
var name = "switchMaxKeptMsgsCount";
|
var name = "maxKeptMsgsCount";
|
||||||
if (RED.settings.hasOwnProperty(name)) {
|
if (RED.settings.hasOwnProperty(name)) {
|
||||||
_max_kept_msgs_count = RED.settings[name];
|
_max_kept_msgs_count = RED.settings[name];
|
||||||
}
|
}
|
||||||
|
@ -353,7 +353,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h4>Note:</h4>
|
<h4>Note:</h4>
|
||||||
<p>This node internally keeps messages for its operation. In order to prevent unexpected memory usage, maximum number of messages kept can be specified by <code>joinMaxKeptMsgsCount</code> property in <b>settings.js</b>.</p>
|
<p>This node internally keeps messages for its operation. In order to prevent unexpected memory usage, maximum number of messages kept can be specified by <code>maxKeptMsgsCount</code> property in <b>settings.js</b>.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -236,7 +236,7 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
function max_kept_msgs_count(node) {
|
function max_kept_msgs_count(node) {
|
||||||
if (_max_kept_msgs_count === undefined) {
|
if (_max_kept_msgs_count === undefined) {
|
||||||
var name = "joinMaxKeptMsgsCount";
|
var name = "maxKeptMsgsCount";
|
||||||
if (RED.settings.hasOwnProperty(name)) {
|
if (RED.settings.hasOwnProperty(name)) {
|
||||||
_max_kept_msgs_count = RED.settings[name];
|
_max_kept_msgs_count = RED.settings[name];
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
<p>Target and order of concatenated sequences are specified by <code>Topics</code> value. Selection of concatenated message groups is based on arrival of first message of the group.</p>
|
<p>Target and order of concatenated sequences are specified by <code>Topics</code> value. Selection of concatenated message groups is based on arrival of first message of the group.</p>
|
||||||
<p><b>Note:</b> This node internally keeps messages for its operation. In order to prevent unexpected memory usage, maximum number of messages kept can be specified. Default is no limit on number of messages.
|
<p><b>Note:</b> This node internally keeps messages for its operation. In order to prevent unexpected memory usage, maximum number of messages kept can be specified. Default is no limit on number of messages.
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>batchMaxKeptMsgsCount</code> property set in <b>settings.js</b>.</li>
|
<li><code>maxKeptMsgsCount</code> property set in <b>settings.js</b>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
</script>
|
</script>
|
||||||
|
@ -21,7 +21,7 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
function max_kept_msgs_count(node) {
|
function max_kept_msgs_count(node) {
|
||||||
if (_max_kept_msgs_count === undefined) {
|
if (_max_kept_msgs_count === undefined) {
|
||||||
var name = "batchMaxKeptMsgsCount";
|
var name = "maxKeptMsgsCount";
|
||||||
if (RED.settings.hasOwnProperty(name)) {
|
if (RED.settings.hasOwnProperty(name)) {
|
||||||
_max_kept_msgs_count = RED.settings[name];
|
_max_kept_msgs_count = RED.settings[name];
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ describe('switch Node', function() {
|
|||||||
afterEach(function(done) {
|
afterEach(function(done) {
|
||||||
helper.unload();
|
helper.unload();
|
||||||
helper.stopServer(done);
|
helper.stopServer(done);
|
||||||
RED.settings.switchMaxKeptMsgsCount = 0;
|
RED.settings.maxKeptMsgsCount = 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be loaded with some defaults', function(done) {
|
it('should be loaded with some defaults', function(done) {
|
||||||
@ -692,7 +692,7 @@ describe('switch Node', function() {
|
|||||||
];
|
];
|
||||||
helper.load(switchNode, flow, function() {
|
helper.load(switchNode, flow, function() {
|
||||||
var n1 = helper.getNode("n1");
|
var n1 = helper.getNode("n1");
|
||||||
RED.settings.switchMaxKeptMsgsCount = 2;
|
RED.settings.maxKeptMsgsCount = 2;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var logEvents = helper.log().args.filter(function (evt) {
|
var logEvents = helper.log().args.filter(function (evt) {
|
||||||
return evt[0].type == "switch";
|
return evt[0].type == "switch";
|
||||||
|
@ -270,7 +270,7 @@ describe('JOIN node', function() {
|
|||||||
|
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
helper.unload();
|
helper.unload();
|
||||||
RED.settings.joinMaxKeptMsgsCount = 0;
|
RED.settings.maxKeptMsgsCount = 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be loaded', function(done) {
|
it('should be loaded', function(done) {
|
||||||
@ -1072,7 +1072,7 @@ describe('JOIN node', function() {
|
|||||||
{id:"n2", type:"helper"}];
|
{id:"n2", type:"helper"}];
|
||||||
helper.load(joinNode, flow, function() {
|
helper.load(joinNode, flow, function() {
|
||||||
var n1 = helper.getNode("n1");
|
var n1 = helper.getNode("n1");
|
||||||
RED.settings.joinMaxKeptMsgsCount = 2;
|
RED.settings.maxKeptMsgsCount = 2;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var logEvents = helper.log().args.filter(function (evt) {
|
var logEvents = helper.log().args.filter(function (evt) {
|
||||||
return evt[0].type == "join";
|
return evt[0].type == "join";
|
||||||
@ -1101,7 +1101,7 @@ describe('JOIN node', function() {
|
|||||||
{id:"n2", type:"helper"}];
|
{id:"n2", type:"helper"}];
|
||||||
helper.load(joinNode, flow, function() {
|
helper.load(joinNode, flow, function() {
|
||||||
var n1 = helper.getNode("n1");
|
var n1 = helper.getNode("n1");
|
||||||
RED.settings.joinMaxKeptMsgsCount = 2;
|
RED.settings.maxKeptMsgsCount = 2;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var logEvents = helper.log().args.filter(function (evt) {
|
var logEvents = helper.log().args.filter(function (evt) {
|
||||||
return evt[0].type == "join";
|
return evt[0].type == "join";
|
||||||
|
@ -28,7 +28,7 @@ describe('BATCH node', function() {
|
|||||||
|
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
helper.unload();
|
helper.unload();
|
||||||
RED.settings.batchMaxKeptMsgsCount = 0;
|
RED.settings.maxKeptMsgsCount = 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be loaded with defaults', function(done) {
|
it('should be loaded with defaults', function(done) {
|
||||||
@ -172,7 +172,7 @@ describe('BATCH node', function() {
|
|||||||
helper.load(batchNode, flow, function() {
|
helper.load(batchNode, flow, function() {
|
||||||
var n1 = helper.getNode("n1");
|
var n1 = helper.getNode("n1");
|
||||||
var n2 = helper.getNode("n2");
|
var n2 = helper.getNode("n2");
|
||||||
RED.settings.batchMaxKeptMsgsCount = 2;
|
RED.settings.maxKeptMsgsCount = 2;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var logEvents = helper.log().args.filter(function (evt) {
|
var logEvents = helper.log().args.filter(function (evt) {
|
||||||
return evt[0].type == "batch";
|
return evt[0].type == "batch";
|
||||||
@ -239,7 +239,7 @@ describe('BATCH node', function() {
|
|||||||
helper.load(batchNode, flow, function() {
|
helper.load(batchNode, flow, function() {
|
||||||
var n1 = helper.getNode("n1");
|
var n1 = helper.getNode("n1");
|
||||||
var n2 = helper.getNode("n2");
|
var n2 = helper.getNode("n2");
|
||||||
RED.settings.batchMaxKeptMsgsCount = 2;
|
RED.settings.maxKeptMsgsCount = 2;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var logEvents = helper.log().args.filter(function (evt) {
|
var logEvents = helper.log().args.filter(function (evt) {
|
||||||
return evt[0].type == "batch";
|
return evt[0].type == "batch";
|
||||||
@ -312,7 +312,7 @@ describe('BATCH node', function() {
|
|||||||
helper.load(batchNode, flow, function() {
|
helper.load(batchNode, flow, function() {
|
||||||
var n1 = helper.getNode("n1");
|
var n1 = helper.getNode("n1");
|
||||||
var n2 = helper.getNode("n2");
|
var n2 = helper.getNode("n2");
|
||||||
RED.settings.batchMaxKeptMsgsCount = 2;
|
RED.settings.maxKeptMsgsCount = 2;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var logEvents = helper.log().args.filter(function (evt) {
|
var logEvents = helper.log().args.filter(function (evt) {
|
||||||
return evt[0].type == "batch";
|
return evt[0].type == "batch";
|
||||||
|
Loading…
Reference in New Issue
Block a user