mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Fix build and lint errors
This commit is contained in:
@@ -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 })
|
||||
})(),
|
||||
})()
|
||||
])
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user