[core] wait 10 seconds and stop
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run

This commit is contained in:
devlikepro committed 2024-10-08 18:04:44 +07:00
1 parent 44e63e00c3
commit 6346433d45
1 file changed
+3
+3
View File
@@ -22,6 +22,7 @@ import {
StopRequest,
StopResponse,
} from '@waha/structures/server.dto';
import { sleep } from '@waha/utils/promiseTimeout';
import { VERSION } from '@waha/version';
import * as lodash from 'lodash';
@@ -101,6 +102,8 @@ export class ServerController {
setTimeout(async () => {
this.logger.log('Gracefully closing the application...');
process.kill(process.pid, 'SIGTERM');
await sleep(10_000);
process.exit(0);
}, timeout);
}
return { stopping: true };