mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
added some debugging
This commit is contained in:
parent
f2dfb718c6
commit
daf40fc757
1 changed files with 4 additions and 0 deletions
|
@ -94,11 +94,13 @@ module.exports = UrlCache =
|
||||||
return callback()
|
return callback()
|
||||||
|
|
||||||
_findUrlDetails: (project_id, url, callback = (error, urlDetails) ->) ->
|
_findUrlDetails: (project_id, url, callback = (error, urlDetails) ->) ->
|
||||||
|
console.log("_findUrlDetails")
|
||||||
db.UrlCache.find(where: { url: url, project_id: project_id })
|
db.UrlCache.find(where: { url: url, project_id: project_id })
|
||||||
.then((urlDetails) -> callback null, urlDetails)
|
.then((urlDetails) -> callback null, urlDetails)
|
||||||
.error callback
|
.error callback
|
||||||
|
|
||||||
_updateOrCreateUrlDetails: (project_id, url, lastModified, callback = (error) ->) ->
|
_updateOrCreateUrlDetails: (project_id, url, lastModified, callback = (error) ->) ->
|
||||||
|
console.log("_updateOrCreateUrlDetails")
|
||||||
db.UrlCache.findOrCreate(where: {url: url, project_id: project_id})
|
db.UrlCache.findOrCreate(where: {url: url, project_id: project_id})
|
||||||
.spread(
|
.spread(
|
||||||
(urlDetails, created) ->
|
(urlDetails, created) ->
|
||||||
|
@ -109,11 +111,13 @@ module.exports = UrlCache =
|
||||||
.error callback
|
.error callback
|
||||||
|
|
||||||
_clearUrlDetails: (project_id, url, callback = (error) ->) ->
|
_clearUrlDetails: (project_id, url, callback = (error) ->) ->
|
||||||
|
console.log("_clearUrlDetails")
|
||||||
db.UrlCache.destroy(where: {url: url, project_id: project_id})
|
db.UrlCache.destroy(where: {url: url, project_id: project_id})
|
||||||
.then(() -> callback null)
|
.then(() -> callback null)
|
||||||
.error callback
|
.error callback
|
||||||
|
|
||||||
_findAllUrlsInProject: (project_id, callback = (error, urls) ->) ->
|
_findAllUrlsInProject: (project_id, callback = (error, urls) ->) ->
|
||||||
|
console.log("_findAllUrlsInProject")
|
||||||
db.UrlCache.findAll(where: { project_id: project_id })
|
db.UrlCache.findAll(where: { project_id: project_id })
|
||||||
.then(
|
.then(
|
||||||
(urlEntries) ->
|
(urlEntries) ->
|
||||||
|
|
Loading…
Reference in a new issue