1
0
Fork 0
mirror of synced 2024-08-05 05:11:43 +12:00

Merge pull request #13872 from Budibase/fix/sqs-app-deletion

Ignore SQS 500s on cleanup
This commit is contained in:
Michael Drury 2024-06-06 17:52:07 +01:00 committed by GitHub
commit 25bc9bd298
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -328,7 +328,14 @@ export class DatabaseImpl implements Database {
async sqlDiskCleanup(): Promise<void> {
const dbName = this.name
const url = `/${dbName}/_cleanup`
return await this._sqlQuery<void>(url, "POST")
try {
await this._sqlQuery<void>(url, "POST")
} catch (err: any) {
// hack for now - SQS throws a 500 when there is nothing to clean-up
if (err.status !== 500) {
throw err
}
}
}
// removes a document from sqlite