Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Overleaf Ruhr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
newton Lars
Overleaf Ruhr
Commits
2ec788cf
Commit
2ec788cf
authored
Jan 6, 2024
by
libnewton
Browse files
Options
Downloads
Patches
Plain Diff
fix track changes bug
parent
f9b1d138
No related branches found
No related tags found
1 merge request
!1
chore: sync upstream
Pipeline
#210632
passed
Jan 6, 2024
Stage: docker
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/document-updater/app/js/HistoryManager.js
+36
-34
36 additions, 34 deletions
services/document-updater/app/js/HistoryManager.js
with
36 additions
and
34 deletions
services/document-updater/app/js/HistoryManager.js
+
36
−
34
View file @
2ec788cf
...
@@ -133,41 +133,43 @@ module.exports = HistoryManager = {
...
@@ -133,41 +133,43 @@ module.exports = HistoryManager = {
// if the doc_ops_length is undefined it means the project is not using track-changes
// if the doc_ops_length is undefined it means the project is not using track-changes
// so we can bail out here
// so we can bail out here
if
(
Settings
.
disableTrackChanges
||
typeof
docOpsLength
===
'
undefined
'
)
{
logger
.
debug
(
{
projectId
,
docId
},
'
skipping flush to track-changes, only using project-history
'
)
return
callback
()
return
callback
()
}
// record updates for track-changes
// if (Settings.disableTrackChanges || typeof docOpsLength === 'undefined') {
return
HistoryRedisManager
.
recordDocHasHistoryOps
(
// logger.debug(
projectId
,
// { projectId, docId },
docId
,
// 'skipping flush to track-changes, only using project-history'
ops
,
// )
function
(
error
)
{
// return callback()
if
(
error
!=
null
)
{
// }
return
callback
(
error
)
}
// // record updates for track-changes
if
(
// return HistoryRedisManager.recordDocHasHistoryOps(
HistoryManager
.
shouldFlushHistoryOps
(
// projectId,
docOpsLength
,
// docId,
ops
.
length
,
// ops,
HistoryManager
.
FLUSH_DOC_EVERY_N_OPS
// function (error) {
)
// if (error != null) {
)
{
// return callback(error)
// Do this in the background since it uses HTTP and so may be too
// }
// slow to wait for when processing a doc update.
// if (
logger
.
debug
(
// HistoryManager.shouldFlushHistoryOps(
{
docOpsLength
,
docId
,
projectId
},
// docOpsLength,
'
flushing track changes api
'
// ops.length,
)
// HistoryManager.FLUSH_DOC_EVERY_N_OPS
HistoryManager
.
flushDocChangesAsync
(
projectId
,
docId
)
// )
}
// ) {
return
callback
()
// // Do this in the background since it uses HTTP and so may be too
}
// // slow to wait for when processing a doc update.
)
// logger.debug(
// { docOpsLength, docId, projectId },
// 'flushing track changes api'
// )
// HistoryManager.flushDocChangesAsync(projectId, docId)
// }
// return callback()
// }
// )
},
},
shouldFlushHistoryOps
(
length
,
opsLength
,
threshold
)
{
shouldFlushHistoryOps
(
length
,
opsLength
,
threshold
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment