Commit f74e8f2b by Archer Committed by GitHub

fix: init (#4955)

parent 9fb5d058
...@@ -39,12 +39,6 @@ export async function register() { ...@@ -39,12 +39,6 @@ export async function register() {
systemStartCb(); systemStartCb();
initGlobalVariables(); initGlobalVariables();
try {
await preLoadWorker();
} catch (error) {
console.error('Preload worker error', error);
}
// Connect to MongoDB // Connect to MongoDB
await connectMongo(connectionMongo, MONGO_URL); await connectMongo(connectionMongo, MONGO_URL);
connectMongo(connectionLogMongo, MONGO_LOG_URL); connectMongo(connectionLogMongo, MONGO_LOG_URL);
...@@ -52,6 +46,12 @@ export async function register() { ...@@ -52,6 +46,12 @@ export async function register() {
//init system config;init vector database;init root user //init system config;init vector database;init root user
await Promise.all([getInitConfig(), initVectorStore(), initRootUser(), loadSystemModels()]); await Promise.all([getInitConfig(), initVectorStore(), initRootUser(), loadSystemModels()]);
try {
await preLoadWorker();
} catch (error) {
console.error('Preload worker error', error);
}
// 异步加载 // 异步加载
initSystemPluginGroups(); initSystemPluginGroups();
initAppTemplateTypes(); initAppTemplateTypes();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment