Merge pull request #13872 from Budibase/fix/sqs-app-deletion
Ignore SQS 500s on cleanup
This commit is contained in:
commit
25bc9bd298
|
@ -328,7 +328,14 @@ export class DatabaseImpl implements Database {
|
||||||
async sqlDiskCleanup(): Promise<void> {
|
async sqlDiskCleanup(): Promise<void> {
|
||||||
const dbName = this.name
|
const dbName = this.name
|
||||||
const url = `/${dbName}/_cleanup`
|
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
|
// removes a document from sqlite
|
||||||
|
|
Loading…
Reference in New Issue