mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Use AbortController to notify nodes to abort execution (#6141)
and add support for cancelling ongoing operations inside a node. --------- Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
committed by
GitHub
parent
0ec67dabf7
commit
d2c18c5727
@@ -347,10 +347,9 @@ export class Wait extends Webhook {
|
||||
if (waitValue < 65000) {
|
||||
// If wait time is shorter than 65 seconds leave execution active because
|
||||
// we just check the database every 60 seconds.
|
||||
return new Promise((resolve, _reject) => {
|
||||
setTimeout(() => {
|
||||
resolve([context.getInputData()]);
|
||||
}, waitValue);
|
||||
return new Promise((resolve) => {
|
||||
const timer = setTimeout(() => resolve([context.getInputData()]), waitValue);
|
||||
context.onExecutionCancellation(() => clearTimeout(timer));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user