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

Capturing any 500s which occur from SQS cleanup - it appears to 500 if there is nothing to do.

This commit is contained in:
mike12345567 2024-06-06 17:38:52 +01:00
parent ea4c3ff5f4
commit ab6614a683

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