mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #7788 from overleaf/jpa-deletion-retries
[web] add retries to project archiver deletion GitOrigin-RevId: 90097a057b1ed6224151ddfb7f5c7be4ed4b34c4
This commit is contained in:
parent
2f2369c74e
commit
ebc24c5bf9
1 changed files with 13 additions and 5 deletions
|
@ -85,12 +85,20 @@ async function hardDeleteProjectArchiverData(prefix) {
|
||||||
console.log(`Destroying hard deleted project archive at '${prefix}/'`)
|
console.log(`Destroying hard deleted project archive at '${prefix}/'`)
|
||||||
if (DRY_RUN) return
|
if (DRY_RUN) return
|
||||||
|
|
||||||
const ok = await TpdsUpdateSender.promises.deleteProject({
|
for (let i = 0; i < 10; i++) {
|
||||||
project_id: encodeURIComponent(prefix),
|
await sleep(1000 * i)
|
||||||
})
|
try {
|
||||||
if (!ok) {
|
const ok = await TpdsUpdateSender.promises.deleteProject({
|
||||||
throw new Error(`deletion failed for '${prefix}/', check logs`)
|
project_id: encodeURIComponent(prefix),
|
||||||
|
})
|
||||||
|
if (ok) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(`deletion failed for '${prefix}/'`, e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
throw new Error(`deletion failed for '${prefix}/', check logs`)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function letUserDoubleCheckInputs() {
|
async function letUserDoubleCheckInputs() {
|
||||||
|
|
Loading…
Reference in a new issue