Fix build and lint errors

This commit is contained in:
Jonas Lochmann
2021-03-08 01:00:00 +01:00
parent 828399ec14
commit 8665e614b5
2 changed files with 4 additions and 6 deletions
+1 -3
View File
@@ -28,8 +28,6 @@ export function shouldRetryWithException(database: Database, e: any): boolean {
const parent = e.parent
if (typeof parent !== 'object') return false
if (database.dialect === 'sqlite') {
if (parent.message.startsWith('SQLITE_BUSY:')) return true
} else if (database.dialect === 'postgres') {
@@ -83,7 +81,7 @@ export async function assertSerializeableTransactionsAreWorking(database: Databa
})(),
(async () => {
await database.config.update({ value: 'd' }, { where: { id: configItemIds.secondSelfTestData }, transaction: transactionTwo })
})(),
})()
])
})
})
+1 -1
View File
@@ -104,7 +104,7 @@ export const applyActionsFromDevice = async ({ database, request, websocket, con
}
})
} catch (ex) {
if (shouldRetryWithException(ex)) {
if (shouldRetryWithException(ex, database)) {
eventHandler.countEvent('applyActionsFromDevice got exception which should cause retry')
throw ex