mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
fix(core): Enforce shutdown timer and sequence on SIGINT
for main (#10346)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
This commit is contained in:
parent
b044e783e7
commit
5255793afe
|
@ -315,7 +315,7 @@ export abstract class BaseCommand extends Command {
|
|||
this.exit(exitCode);
|
||||
}
|
||||
|
||||
private onTerminationSignal(signal: string) {
|
||||
protected onTerminationSignal(signal: string) {
|
||||
return async () => {
|
||||
if (this.shutdownService.isShuttingDown()) {
|
||||
this.logger.info(`Received ${signal}. Already shutting down...`);
|
||||
|
|
|
@ -332,7 +332,7 @@ export class Start extends BaseCommand {
|
|||
this.openBrowser();
|
||||
} else if (key.charCodeAt(0) === 3) {
|
||||
// Ctrl + c got pressed
|
||||
void this.stopProcess();
|
||||
void this.onTerminationSignal('SIGINT')();
|
||||
} else {
|
||||
// When anything else got pressed, record it and send it on enter into the child process
|
||||
|
||||
|
|
Loading…
Reference in a new issue