mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Improve logging
This commit is contained in:
parent
303dcba51b
commit
51dd24574a
1 changed files with 3 additions and 2 deletions
|
@ -60,16 +60,17 @@ module.exports = HoldingAccountMigration =
|
||||||
callback()
|
callback()
|
||||||
|
|
||||||
run: (done = () ->) ->
|
run: (done = () ->) ->
|
||||||
|
console.log "[Getting list of holding accounts]"
|
||||||
HoldingAccountMigration.findHoldingAccounts (error, users) ->
|
HoldingAccountMigration.findHoldingAccounts (error, users) ->
|
||||||
throw error if error?
|
throw error if error?
|
||||||
console.log "[Got list of holding accounts]", users.map (u) -> u._id
|
console.log "[Got #{users.length} holding accounts]"
|
||||||
jobs = users.map (u) ->
|
jobs = users.map (u) ->
|
||||||
(cb) ->
|
(cb) ->
|
||||||
HoldingAccountMigration.deleteUser u._id, (error) ->
|
HoldingAccountMigration.deleteUser u._id, (error) ->
|
||||||
return cb(error) if error?
|
return cb(error) if error?
|
||||||
HoldingAccountMigration.deleteUserProjects u._id, (error) ->
|
HoldingAccountMigration.deleteUserProjects u._id, (error) ->
|
||||||
return cb(error) if error?
|
return cb(error) if error?
|
||||||
setTimeout cb, 200 # Small delay to not hammer DB
|
setTimeout cb, 50 # Small delay to not hammer DB
|
||||||
async.series jobs, (error) ->
|
async.series jobs, (error) ->
|
||||||
throw error if error?
|
throw error if error?
|
||||||
console.log "[FINISHED]"
|
console.log "[FINISHED]"
|
||||||
|
|
Loading…
Reference in a new issue