mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Consider timeout in shutdown an error (#8050)
If the process doesn't shutdown within a time limit, exit with error code. 1. conceptually something timing out is an error. 2. on successful exit we close down the DB connection gracefully. On an exit timeout we rather not do that, since it will wait for any active connections to close and would possible block the exit.
This commit is contained in:
@@ -103,13 +103,6 @@ export class Start extends BaseCommand {
|
||||
|
||||
await this.externalHooks?.run('n8n.stop', []);
|
||||
|
||||
setTimeout(async () => {
|
||||
// In case that something goes wrong with shutdown we
|
||||
// kill after max. 30 seconds no matter what
|
||||
console.log('process exited after 30s');
|
||||
await this.exitSuccessFully();
|
||||
}, 30000);
|
||||
|
||||
// Shut down License manager to unclaim any floating entitlements
|
||||
// Note: While this saves a new license cert to DB, the previous entitlements are still kept in memory so that the shutdown process can complete
|
||||
await Container.get(License).shutdown();
|
||||
|
||||
Reference in New Issue
Block a user