mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 07:31:07 +01:00
@@ -403,6 +403,8 @@ module.exports = function(RED) {
|
||||
if(node.timeout>0){
|
||||
finOpt.timeout = node.timeout;
|
||||
finOpt.breakOnSigint = true;
|
||||
} else if (RED.settings.globalFunctionTimeout > 0){
|
||||
finOpt.timeout = RED.settings.globalFunctionTimeout * 1000
|
||||
}
|
||||
}
|
||||
var promise = Promise.resolve();
|
||||
@@ -419,8 +421,14 @@ module.exports = function(RED) {
|
||||
var opts = {};
|
||||
if (node.timeout>0){
|
||||
opts = node.timeoutOptions;
|
||||
} else if (RED.settings. globalFunctionTimeout > 0){
|
||||
opts.timeout = RED.settings. globalFunctionTimeout * 1000
|
||||
}
|
||||
try {
|
||||
node.script.runInContext(context,opts);
|
||||
} catch (err) {
|
||||
return done(err);
|
||||
}
|
||||
node.script.runInContext(context,opts);
|
||||
context.results.then(function(results) {
|
||||
sendResults(node,send,msg._msgid,results,false);
|
||||
if (handleNodeDoneCall) {
|
||||
|
||||
Reference in New Issue
Block a user