[web+project-history] Add lastResyncedAt field to projects and set after resync (#33240)

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: f679a190b88694a46f7816d51eff96446f338dec
This commit is contained in:
Mathias Jakobsen
2026-04-30 08:06:43 +00:00
committed by Copybot
co-authored by Jakob Ackermann
parent 50abfe8f0c
commit a478c1a829
5 changed files with 42 additions and 4 deletions
@@ -222,6 +222,17 @@ async function setResyncState(projectId, syncState) {
update,
{ upsert: true }
)
if (!syncState.isSyncOngoing()) {
await db.projects.updateOne(
{ _id: new ObjectId(projectId) },
{
$max: {
'overleaf.history.lastResyncedAt': new Date(),
},
}
)
}
}
async function clearResyncState(projectId) {