mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(API): Report unhandled app crashes to Sentry (#4548)
* SIGTERM/SIGINT should only be handled once * move error-handling initialization to commands * create a new `sleep` function in workflow utils * detect crashes and report them to Sentry
This commit is contained in:
committed by
GitHub
parent
5d852f9230
commit
2425c10b2b
@@ -1,4 +1,4 @@
|
||||
import { IDataObject, IExecuteFunctions, ITriggerFunctions } from 'n8n-workflow';
|
||||
import { IDataObject, IExecuteFunctions, ITriggerFunctions, sleep } from 'n8n-workflow';
|
||||
|
||||
import * as amqplib from 'amqplib';
|
||||
|
||||
@@ -138,9 +138,7 @@ export class MessageTracker {
|
||||
// when for example a new version of the workflow got saved. That would lead to
|
||||
// them getting delivered and processed again.
|
||||
while (unansweredMessages !== 0 && count++ <= 300) {
|
||||
await new Promise((resolve) => {
|
||||
setTimeout(resolve, 1000);
|
||||
});
|
||||
await sleep(1000);
|
||||
unansweredMessages = this.unansweredMessages();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user