Assorted cleanup, minor bug fixes, styling fixes, eslint rules (#5165
* fix: Logic error in toast fix: Remove useless component * fix: Logout not clearing all stores * Add icons to notification settings * Add eslint rule to enforce spaced comment * Add eslint rule for arrow-body-style * Add eslint rule to enforce self-closing components * Add menu to api key settings Fix: Deleting webhook subscription does not remove from UI Split webhook subscriptions into active and inactive Styling updates
This commit is contained in:
@@ -139,22 +139,25 @@ async function start(id: number, disconnect: () => void) {
|
||||
server.listen(normalizedPortFlag || env.PORT || "3000");
|
||||
server.setTimeout(env.REQUEST_TIMEOUT);
|
||||
|
||||
ShutdownHelper.add("server", ShutdownOrder.last, () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
// Calling stop prevents new connections from being accepted and waits for
|
||||
// existing connections to close for the grace period before forcefully
|
||||
// closing them.
|
||||
server.stop((err, gracefully) => {
|
||||
disconnect();
|
||||
ShutdownHelper.add(
|
||||
"server",
|
||||
ShutdownOrder.last,
|
||||
() =>
|
||||
new Promise((resolve, reject) => {
|
||||
// Calling stop prevents new connections from being accepted and waits for
|
||||
// existing connections to close for the grace period before forcefully
|
||||
// closing them.
|
||||
server.stop((err, gracefully) => {
|
||||
disconnect();
|
||||
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(gracefully);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(gracefully);
|
||||
}
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
// Handle shutdown signals
|
||||
process.once("SIGTERM", () => ShutdownHelper.execute());
|
||||
|
||||
Reference in New Issue
Block a user