fix: add order:true to all create transactions (#3948)

This commit is contained in:
Finley Ge
2025-03-03 11:37:51 +08:00
committed by GitHub
parent 113e8f711f
commit 4bc7f21182
30 changed files with 425 additions and 352 deletions

View File

@@ -63,7 +63,7 @@ async function initHttp(teamId?: string): Promise<any> {
}
}
],
{ session }
{ session, ordered: true }
);
/* 批量创建子插件 */
@@ -88,7 +88,7 @@ async function initHttp(teamId?: string): Promise<any> {
}
}
],
{ session }
{ session, ordered: true }
);
if (item.version === 'v2') {
await MongoAppVersion.create(
@@ -100,7 +100,7 @@ async function initHttp(teamId?: string): Promise<any> {
edges: item.edges
}
],
{ session }
{ session, ordered: true }
);
}
}
@@ -160,7 +160,7 @@ async function initPlugin(teamId?: string): Promise<any> {
}
}
],
{ session }
{ session, ordered: true }
);
if (plugin.version === 'v2') {
@@ -173,7 +173,7 @@ async function initPlugin(teamId?: string): Promise<any> {
edges: plugin.edges
}
],
{ session }
{ session, ordered: true }
);
}

View File

@@ -98,7 +98,8 @@ async function handler(
}
],
{
session
session,
ordered: true
}
);
}

View File

@@ -126,7 +126,7 @@ export const onCreateApp = async ({
'pluginData.nodeVersion': defaultNodeVersion
}
],
{ session }
{ session, ordered: true }
);
if (!AppFolderTypeList.includes(type!)) {
@@ -144,7 +144,7 @@ export const onCreateApp = async ({
isPublish: true
}
],
{ session }
{ session, ordered: true }
);
}

View File

@@ -89,7 +89,8 @@ async function handler(req: ApiRequestProps<CreateAppFolderBody>) {
}
],
{
session
session,
ordered: true
}
);
}

View File

@@ -45,7 +45,7 @@ async function handler(req: ApiRequestProps<PostPublishAppProps>, res: NextApiRe
tmbId
}
],
{ session }
{ session, ordered: true }
);
// update app

View File

@@ -88,7 +88,7 @@ async function handler(
yuqueServer
}
],
{ session }
{ session, ordered: true }
);
await refreshSourceAvatar(avatar, undefined, session);

View File

@@ -87,7 +87,7 @@ async function handler(
permission: OwnerPermissionVal
}
],
{ session }
{ session, ordered: true }
);
}
});

View File

@@ -122,7 +122,8 @@ async function handler(req: ApiRequestProps<rebuildEmbeddingBody>): Promise<Resp
}
],
{
session
session,
ordered: true
}
);
}

View File

@@ -98,7 +98,7 @@ export async function insertData2Dataset({
}))
}
],
{ session }
{ session, ordered: true }
);
// 3. Create mongo data text
@@ -112,7 +112,7 @@ export async function insertData2Dataset({
fullTextToken: jiebaSplit({ text: qaStr })
}
],
{ session }
{ session, ordered: true }
);
return {

View File

@@ -192,7 +192,7 @@ const rebuildData = async ({
retryCount: 50
}
],
{ session }
{ session, ordered: true }
);
}
});

View File

@@ -37,7 +37,7 @@ export async function initRootUser(retry = 3): Promise<any> {
password: hashStr(psw)
}
],
{ session }
{ session, ordered: true }
);
rootId = _id;
}