mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02: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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user