chore(server): reschedule doc merging jobs (#11318)

This commit is contained in:
forehalo
2025-04-01 10:57:54 +00:00
parent d38458b733
commit 6276732efc
8 changed files with 90 additions and 50 deletions

View File

@@ -88,6 +88,13 @@ export class DocModel extends BaseModel {
return await this.db.update.count();
}
async groupedUpdatesCount() {
return await this.db.update.groupBy({
by: ['workspaceId', 'id'],
_count: true,
});
}
/**
* Delete updates by workspaceId, docId, and createdAts.
*/