mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-29 02:57:12 +00:00
remove logging, fix query
This commit is contained in:
parent
33fb1ddf57
commit
a7ff15ec7d
1 changed files with 2 additions and 2 deletions
|
@ -30,14 +30,14 @@ success = 0
|
||||||
fixDangling = (doc_id, callback) ->
|
fixDangling = (doc_id, callback) ->
|
||||||
# look up project id from doc id
|
# look up project id from doc id
|
||||||
db.docs.find {_id:ObjectId(doc_id)}, {project_id:1}, (err, result) ->
|
db.docs.find {_id:ObjectId(doc_id)}, {project_id:1}, (err, result) ->
|
||||||
console.log "doc_id", doc_id, "err", err, "result", result
|
#console.log "doc_id", doc_id, "err", err, "result", result
|
||||||
if err?
|
if err?
|
||||||
errored++
|
errored++
|
||||||
return callback()
|
return callback()
|
||||||
if !result? or result.length == 0
|
if !result? or result.length == 0
|
||||||
missing++
|
missing++
|
||||||
return callback()
|
return callback()
|
||||||
project_id = result[0]
|
project_id = result[0].project_id
|
||||||
console.log "found project_id", project_id, "for doc_id", doc_id
|
console.log "found project_id", project_id, "for doc_id", doc_id
|
||||||
url = "http://localhost:#{options.port}/project/#{project_id}/doc/#{doc_id}/flush"
|
url = "http://localhost:#{options.port}/project/#{project_id}/doc/#{doc_id}/flush"
|
||||||
if options.force
|
if options.force
|
||||||
|
|
Loading…
Reference in a new issue