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}/'`)
|
||||
if (DRY_RUN) return
|
||||
|
||||
const ok = await TpdsUpdateSender.promises.deleteProject({
|
||||
project_id: encodeURIComponent(prefix),
|
||||
})
|
||||
if (!ok) {
|
||||
throw new Error(`deletion failed for '${prefix}/', check logs`)
|
||||
for (let i = 0; i < 10; i++) {
|
||||
await sleep(1000 * i)
|
||||
try {
|
||||
const ok = await TpdsUpdateSender.promises.deleteProject({
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue