overleaf/services
Domagoj Kriskovic c931d90f34 Wait for "doc:saved" event before compiling (#16153)
* wait doc:saved before compiling

* Refactor DocumentCompiler class to handle pending operations before compilation

* add timeout for pending op

* Increase PENDING_OP_MAX_WAIT to 10000 milliseconds

* check if currentDoc exists

* check doc id on doc:saved

* Fix conditional statement

* Refactor to add and remove event listeners for doc:saved event

* check if getPendingOp exists

* typeof getPendingOp

* forgot to push updates

* add flush-changes event

* use promise for handling pending operations

* Remove console.logs

* add isAwaitingBufferedOps

* Revert "add isAwaitingBufferedOps"

This reverts commit 56b0bbc13caf6375d1cf50e8f65f599e7263c404.

* move _awaitBufferedOps in try block

* dont check for matching doc id

* add a todo comment

GitOrigin-RevId: 9225e7d1a7a69385dc1a26bf7663f89f59db6a8a
2024-01-16 09:04:05 +00:00
..
chat Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
clsi Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
contacts Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
docstore Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
document-updater Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
filestore Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
git-bridge
history-v1 Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
notifications Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
project-history Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
real-time Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
spelling Merge pull request #16385 from overleaf/em-typescript-other-services 2024-01-12 09:03:22 +00:00
web Wait for "doc:saved" event before compiling (#16153) 2024-01-16 09:04:05 +00:00