新增项目数据库自检流程
This commit is contained in:
@@ -1418,7 +1418,16 @@ async function start() {
|
||||
try {
|
||||
console.log('🔧 Initializing services...');
|
||||
// Ensure DB is ready before starting anything else
|
||||
await checkAndFixDatabase();
|
||||
try {
|
||||
const dbFixed = await checkAndFixDatabase();
|
||||
if (dbFixed) {
|
||||
// Re-run the local checkDb() to update isDbInitialized and other status variables
|
||||
await checkDb();
|
||||
}
|
||||
} catch (dbErr) {
|
||||
console.warn('⚠️ Database initialization check encountered an error:', dbErr.message);
|
||||
// We don't necessarily crash here, but users will see the setup screen if isDbInitialized is false
|
||||
}
|
||||
|
||||
// Start services
|
||||
latencyService.start();
|
||||
|
||||
Reference in New Issue
Block a user