adding function timeout to settings file

adding function timeout to settings file
This commit is contained in:
Kilian Hertel
2023-08-04 14:20:49 +02:00
parent 4d3e3a73fd
commit f7b64b101e
5 changed files with 10193 additions and 2 deletions

View File

@@ -365,7 +365,7 @@
name: {value:"_DEFAULT_"},
func: {value:"\nreturn msg;"},
outputs: {value:1},
timeout:{value:0},
timeout:{value:RED.settings.functionTimeout},
noerr: {value:0,required:true,
validate: function(v, opt) {
if (!v) {

View File

@@ -521,7 +521,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");

View File

@@ -468,6 +468,8 @@ module.exports = {
/** Allow the Function node to load additional npm modules directly */
functionExternalModules: true,
/** Default timeout fir function node */
functionTimeout:0,
/** 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: