fix restart delay
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Server, Subprocess, WebSocketHandler } from "bun";
|
||||
import { Server, WebSocketHandler } from "bun";
|
||||
import { Logger } from "pino";
|
||||
import { RadixRouter } from "radix3";
|
||||
import { PrismaClient } from "../../app/db/db";
|
||||
@@ -48,7 +48,7 @@ export const g = global as unknown as {
|
||||
firebaseInit: boolean;
|
||||
firebase: admin.app.App;
|
||||
main: {
|
||||
process: null | Subprocess;
|
||||
process: null | Worker;
|
||||
restart: {
|
||||
timeout: any;
|
||||
};
|
||||
@@ -88,7 +88,7 @@ export const g = global as unknown as {
|
||||
gz: Record<string, Uint8Array>;
|
||||
};
|
||||
createServer: (
|
||||
arg: PrasiServer & { api: any; db: any }
|
||||
arg: PrasiServer & { api: any; db: any },
|
||||
) => (site_id: string) => Promise<PrasiServer & { api: any; db: any }>;
|
||||
deploy: {
|
||||
init: boolean;
|
||||
|
||||
@@ -4,6 +4,7 @@ import { g } from "./global";
|
||||
export const restartServer = () => {
|
||||
if (g.mode === "dev") {
|
||||
$`bun ${g.mode}`;
|
||||
} else {
|
||||
postMessage("restart");
|
||||
}
|
||||
process.exit(0);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user