Merge pull request #4805 from overleaf/em-cleanup-expired-projects

Limit cleanup script to expired projects

GitOrigin-RevId: 49ea2c08cee92f027f21e3e8b07bf9491a9f089f
This commit is contained in:
Eric Mc Sween 2021-08-18 08:38:12 -04:00 committed by Copybot
parent 5679ba894b
commit b2e6eaf936

View file

@ -25,9 +25,14 @@ waitForDb()
})
async function main() {
await batchedUpdate('deletedProjects', {}, processDeletedProjects, {
await batchedUpdate(
'deletedProjects',
{ project: null },
processDeletedProjects,
{
'deleterData.deletedProjectId': 1,
})
}
)
if (DRY_RUN) {
console.log(
'\nThis was a dry run. Re-run with DRY_RUN=false to delete broken refs and projects.'