mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #2798 from overleaf/spd-count-files
Add script to delete deleted-project data from filestore GitOrigin-RevId: 9a2c5861edddf5ed26fc684257369fac4cf95475
This commit is contained in:
committed by
Copybot
parent
f762fd1d16
commit
bbe9f9a620
@@ -3,6 +3,8 @@ const ProjectEntityHandler = require('../app/src/Features/Project/ProjectEntityH
|
||||
const ProjectGetter = require('../app/src/Features/Project/ProjectGetter')
|
||||
const Errors = require('../app/src/Features/Errors/Errors')
|
||||
|
||||
/* eslint-disable no-console */
|
||||
|
||||
async function countFiles() {
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin
|
||||
@@ -29,10 +31,17 @@ async function countFiles() {
|
||||
if (err instanceof Errors.NotFoundError) {
|
||||
console.error(projectId, 'NOTFOUND')
|
||||
} else {
|
||||
throw err
|
||||
console.log(projectId, 'ERROR', err.name, err.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
countFiles().then(() => process.exit(0))
|
||||
countFiles()
|
||||
.then(() => {
|
||||
process.exit(0)
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('Aiee, something went wrong!', err)
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user