From 1b5f4a0f9d17387088324c089ddd18a0268ad5ba Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 24 Jan 2022 22:50:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A5=E5=BF=97=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/data/index.ts | 2 +- back/loaders/db.ts | 1 + src/pages/crontab/logModal.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/back/data/index.ts b/back/data/index.ts index e2bfa5d7..337c0137 100644 --- a/back/data/index.ts +++ b/back/data/index.ts @@ -6,7 +6,7 @@ export const sequelize = new Sequelize({ storage: `${config.dbPath}database.sqlite`, logging: false, pool: { - max: 5, + max: 6, min: 0, idle: 30000, }, diff --git a/back/loaders/db.ts b/back/loaders/db.ts index ed51448e..cc8494cd 100644 --- a/back/loaders/db.ts +++ b/back/loaders/db.ts @@ -12,6 +12,7 @@ import { sequelize } from '../data'; export default async () => { try { await sequelize.sync({ alter: true }); + await new Promise((resolve) => setTimeout(() => resolve(null), 5000)); const crondbExist = await fileExist(config.cronDbFile); const dependenceDbExist = await fileExist(config.dependenceDbFile); diff --git a/src/pages/crontab/logModal.tsx b/src/pages/crontab/logModal.tsx index b48bb911..0dfa2bcc 100644 --- a/src/pages/crontab/logModal.tsx +++ b/src/pages/crontab/logModal.tsx @@ -90,7 +90,7 @@ const CronLogModal = ({ return ( <> {(executing || loading) && } - {!executing && } + {!executing && !loading && } 日志-{cron && cron.name}{' '} );