[document-updater] migrate HistoryManager to async/await (#28789)

shouldFlushHistoryOps has a default value for 'threshold', which keeps
the exports simpler and still lets the unit tests override it.

GitOrigin-RevId: 1c6d4a2778052b5af40e2e338589a230ac2f4646
This commit is contained in:
Jakob Ackermann
2025-10-09 08:07:36 +00:00
committed by Copybot
parent b0b9733a42
commit d648c96603
5 changed files with 169 additions and 236 deletions
@@ -228,8 +228,7 @@ async function updateProjectWithLocks(
HistoryManager.shouldFlushHistoryOps(
projectId,
projectOpsLength,
updates.length,
HistoryManager.FLUSH_PROJECT_EVERY_N_OPS
updates.length
)
) {
HistoryManager.flushProjectChangesAsync(projectId)