New license (#4809)
* feat: new-license * perf: volumn watch * Set use client
This commit is contained in:
@@ -7,6 +7,7 @@ import { debounce } from 'lodash';
|
||||
import { MongoAppTemplate } from '@fastgpt/service/core/app/templates/templateSchema';
|
||||
import { getAppTemplatesAndLoadThem } from '@fastgpt/templates/register';
|
||||
import { watchSystemModelUpdate } from '@fastgpt/service/core/ai/config/utils';
|
||||
import { SystemConfigsTypeEnum } from '@fastgpt/global/common/system/config/constants';
|
||||
|
||||
export const startMongoWatch = async () => {
|
||||
reloadConfigWatch();
|
||||
@@ -21,7 +22,11 @@ const reloadConfigWatch = () => {
|
||||
|
||||
changeStream.on('change', async (change) => {
|
||||
try {
|
||||
if (change.operationType === 'insert') {
|
||||
if (
|
||||
(change.operationType === 'insert' &&
|
||||
change.fullDocument.type === SystemConfigsTypeEnum.fastgptPro) ||
|
||||
change.operationType === 'update'
|
||||
) {
|
||||
await initSystemConfig();
|
||||
console.log('refresh system config');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user