adding timeout attribute to function node

- [x] New feature (non-breaking change which adds functionality)

Discussion here:
https://discourse.nodered.org/t/function-node-doesnt-have-timeout-feature/78483

## Proposed changes

Adding a timeout attribute to the function node, so an endless funciton doesnt break the node red server.

## Checklist

- [x] I have read the [contribution guidelines](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
- [x] For non-bugfix PRs, I have discussed this change on the forum/slack team.
- [x] I have run `grunt` to verify the unit tests pass
- [x] I have added suitable unit tests to cover the new/changed functionality
This commit is contained in:
Kilian Hertel
2023-05-22 10:16:37 +02:00
parent 67dd7e30fa
commit 2253417459
6 changed files with 78 additions and 8 deletions

View File

@@ -248,7 +248,8 @@
"initialize": "On Start",
"finalize": "On Stop",
"outputs": "Outputs",
"modules": "Modules"
"modules": "Modules",
"timeout": "Timeout (ms)"
},
"text": {
"initialize": "// Code added here will be run once\n// whenever the node is started.\n",