mirror of
https://github.com/ershisan99/www.git
synced 2025-12-18 12:34:17 +00:00
add logs for neatqueue weird response breaking the sync
This commit is contained in:
@@ -46,10 +46,17 @@ export async function syncHistory() {
|
|||||||
const firstGame = Object.keys(matches).sort(
|
const firstGame = Object.keys(matches).sort(
|
||||||
(a, b) => Number.parseInt(a) - Number.parseInt(b)
|
(a, b) => Number.parseInt(a) - Number.parseInt(b)
|
||||||
)[0]
|
)[0]
|
||||||
|
|
||||||
if (!firstGame) {
|
if (!firstGame) {
|
||||||
throw new Error('No first game found')
|
throw new Error('No first game found')
|
||||||
}
|
}
|
||||||
|
if (firstGame === 'detail') {
|
||||||
|
await db.insert(metadata).values({
|
||||||
|
key: 'history_cursor_failure',
|
||||||
|
value: JSON.stringify(matches),
|
||||||
|
})
|
||||||
|
throw new Error('Something went wrong')
|
||||||
|
}
|
||||||
await db
|
await db
|
||||||
.insert(metadata)
|
.insert(metadata)
|
||||||
.values({
|
.values({
|
||||||
|
|||||||
Reference in New Issue
Block a user