fix restart delay
This commit is contained in:
parent
02239da2e2
commit
bc2a454bd0
|
|
@ -3,7 +3,6 @@ import { dirAsync, existsAsync } from "fs-jetpack";
|
||||||
import { deploy } from "utils/deploy";
|
import { deploy } from "utils/deploy";
|
||||||
import { startDevWatcher } from "utils/dev-watcher";
|
import { startDevWatcher } from "utils/dev-watcher";
|
||||||
import { dir } from "utils/dir";
|
import { dir } from "utils/dir";
|
||||||
import { ensureNotRunning } from "utils/ensure";
|
|
||||||
import { genEnv, parseEnv } from "utils/parse-env";
|
import { genEnv, parseEnv } from "utils/parse-env";
|
||||||
import { preparePrisma } from "utils/prisma";
|
import { preparePrisma } from "utils/prisma";
|
||||||
import { generateAPIFrm } from "./server/api-frm";
|
import { generateAPIFrm } from "./server/api-frm";
|
||||||
|
|
@ -48,9 +47,6 @@ if (!process.env.PORT) {
|
||||||
|
|
||||||
await preparePrisma();
|
await preparePrisma();
|
||||||
await createLogger();
|
await createLogger();
|
||||||
if (g.mode !== "prod") {
|
|
||||||
await ensureNotRunning();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g.db) {
|
if (g.db) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -70,9 +70,10 @@ export const createServer = async () => {
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await ensureNotRunning();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await ensureNotRunning();
|
||||||
|
|
||||||
g.server = Bun.serve({
|
g.server = Bun.serve({
|
||||||
port: g.port,
|
port: g.port,
|
||||||
maxRequestBodySize: 1024 * 1024 * 128,
|
maxRequestBodySize: 1024 * 1024 * 128,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue