修复日志加载状态

This commit is contained in:
whyour 2022-01-24 22:50:01 +08:00
parent c9c4043a4e
commit 1b5f4a0f9d
3 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@ export const sequelize = new Sequelize({
storage: `${config.dbPath}database.sqlite`, storage: `${config.dbPath}database.sqlite`,
logging: false, logging: false,
pool: { pool: {
max: 5, max: 6,
min: 0, min: 0,
idle: 30000, idle: 30000,
}, },

View File

@ -12,6 +12,7 @@ import { sequelize } from '../data';
export default async () => { export default async () => {
try { try {
await sequelize.sync({ alter: true }); await sequelize.sync({ alter: true });
await new Promise((resolve) => setTimeout(() => resolve(null), 5000));
const crondbExist = await fileExist(config.cronDbFile); const crondbExist = await fileExist(config.cronDbFile);
const dependenceDbExist = await fileExist(config.dependenceDbFile); const dependenceDbExist = await fileExist(config.dependenceDbFile);

View File

@ -90,7 +90,7 @@ const CronLogModal = ({
return ( return (
<> <>
{(executing || loading) && <Loading3QuartersOutlined spin />} {(executing || loading) && <Loading3QuartersOutlined spin />}
{!executing && <CheckCircleOutlined />} {!executing && !loading && <CheckCircleOutlined />}
<span style={{ marginLeft: 5 }}>-{cron && cron.name}</span>{' '} <span style={{ marginLeft: 5 }}>-{cron && cron.name}</span>{' '}
</> </>
); );