Capturing any 500s which occur from SQS cleanup - it appears to 500 if there is nothing to do.
This commit is contained in:
parent
ea4c3ff5f4
commit
ab6614a683
|
@ -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