chore: Add sleep before Slack notification
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import groupBy from "lodash/groupBy";
|
||||
import Logger from "@server/logging/Logger";
|
||||
import { timeout } from "./timers";
|
||||
import { sleep } from "./timers";
|
||||
|
||||
export enum ShutdownOrder {
|
||||
first = 0,
|
||||
@@ -59,7 +59,7 @@ export default class ShutdownHelper {
|
||||
this.isShuttingDown = true;
|
||||
|
||||
// Start the shutdown timer
|
||||
void timeout(this.forceQuitTimeout).then(() => {
|
||||
void sleep(this.forceQuitTimeout).then(() => {
|
||||
Logger.info("lifecycle", "Force quitting");
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*
|
||||
* @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
|
||||
*/
|
||||
export function timeout(ms = 1) {
|
||||
export function sleep(ms = 1) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user