New license (#4809)
* feat: new-license * perf: volumn watch * Set use client
This commit is contained in:
@@ -17,7 +17,9 @@ export async function register() {
|
||||
{ getSystemPluginCb },
|
||||
{ startMongoWatch },
|
||||
{ startCron },
|
||||
{ startTrainingQueue }
|
||||
{ startTrainingQueue },
|
||||
{ preLoadWorker },
|
||||
{ loadSystemModels }
|
||||
] = await Promise.all([
|
||||
import('@fastgpt/service/common/mongo/init'),
|
||||
import('@fastgpt/service/common/mongo/index'),
|
||||
@@ -28,7 +30,9 @@ export async function register() {
|
||||
import('@/service/core/app/plugin'),
|
||||
import('@/service/common/system/volumnMongoWatch'),
|
||||
import('@/service/common/system/cron'),
|
||||
import('@/service/core/dataset/training/utils')
|
||||
import('@/service/core/dataset/training/utils'),
|
||||
import('@fastgpt/service/worker/preload'),
|
||||
import('@fastgpt/service/core/ai/config/utils')
|
||||
]);
|
||||
|
||||
// 执行初始化流程
|
||||
@@ -40,8 +44,9 @@ export async function register() {
|
||||
connectMongo(connectionLogMongo, MONGO_LOG_URL);
|
||||
|
||||
//init system config;init vector database;init root user
|
||||
await Promise.all([getInitConfig(), initVectorStore(), initRootUser()]);
|
||||
await Promise.all([getInitConfig(), initVectorStore(), initRootUser(), loadSystemModels()]);
|
||||
|
||||
// 异步加载
|
||||
initSystemPluginGroups();
|
||||
initAppTemplateTypes();
|
||||
getSystemPluginCb();
|
||||
@@ -49,6 +54,12 @@ export async function register() {
|
||||
startCron();
|
||||
startTrainingQueue(true);
|
||||
|
||||
try {
|
||||
await preLoadWorker();
|
||||
} catch (error) {
|
||||
console.error('Preload worker error', error);
|
||||
}
|
||||
|
||||
console.log('Init system success');
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user