mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
adding functionTimeout to settings
This commit is contained in:
@@ -360,6 +360,10 @@
|
||||
name: {value:"_DEFAULT_"},
|
||||
func: {value:"\nreturn msg;"},
|
||||
outputs: {value:1},
|
||||
<<<<<<< Updated upstream
|
||||
=======
|
||||
timeout:{value:RED.settings.functionTimeout},
|
||||
>>>>>>> Stashed changes
|
||||
noerr: {value:0,required:true,
|
||||
validate: function(v, opt) {
|
||||
if (!v) {
|
||||
|
||||
@@ -503,7 +503,8 @@ module.exports = function(RED) {
|
||||
RED.nodes.registerType("function",FunctionNode, {
|
||||
dynamicModuleList: "libs",
|
||||
settings: {
|
||||
functionExternalModules: { value: true, exportable: true }
|
||||
functionExternalModules: { value: true, exportable: true },
|
||||
functionTimeout: { value:0, exportable: true }
|
||||
}
|
||||
});
|
||||
RED.library.register("functions");
|
||||
|
||||
5
packages/node_modules/node-red/settings.js
vendored
5
packages/node_modules/node-red/settings.js
vendored
@@ -454,6 +454,9 @@ module.exports = {
|
||||
/** Allow the Function node to load additional npm modules directly */
|
||||
functionExternalModules: true,
|
||||
|
||||
/** a default timeout for function node VM*/
|
||||
functionTimeout:30,
|
||||
|
||||
/** The following property can be used to set predefined values in Global Context.
|
||||
* This allows extra node modules to be made available with in Function node.
|
||||
* For example, the following:
|
||||
@@ -465,6 +468,8 @@ module.exports = {
|
||||
// os:require('os'),
|
||||
},
|
||||
|
||||
|
||||
|
||||
/** The maximum number of messages nodes will buffer internally as part of their
|
||||
* operation. This applies across a range of nodes that operate on message sequences.
|
||||
* defaults to no limit. A value of 0 also means no limit is applied.
|
||||
|
||||
Reference in New Issue
Block a user