catch sync reading progress query error
This commit is contained in:
@ -6,8 +6,8 @@ import {
|
||||
fetchCachedReadingPositionsAndMembers,
|
||||
reduceCachedReadingPositionMembers,
|
||||
} from '../services/cached_reading_position'
|
||||
import { logger } from '../utils/logger'
|
||||
import { updateLibraryItemReadingProgress } from '../services/library_item'
|
||||
import { logger } from '../utils/logger'
|
||||
|
||||
export const SYNC_READ_POSITIONS_JOB_NAME = 'sync-read-positions'
|
||||
|
||||
@ -86,6 +86,10 @@ export const syncReadPositionsJob = async (_data: any) => {
|
||||
|
||||
const updates = getSyncUpdatesIterator(redis)
|
||||
for await (const value of updates) {
|
||||
await syncReadPosition(value)
|
||||
try {
|
||||
await syncReadPosition(value)
|
||||
} catch (error) {
|
||||
logger.error('error syncing reading position', { error, value })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -438,7 +438,7 @@ const mixHomeItems = (
|
||||
|
||||
// use prometheus to monitor the latency of each step
|
||||
const latency = new client.Histogram({
|
||||
name: 'update_home_latency',
|
||||
name: 'omnivore_update_home_latency',
|
||||
help: 'Latency of update home job',
|
||||
labelNames: ['step'],
|
||||
buckets: [0.1, 0.5, 1, 2, 5, 10],
|
||||
|
||||
Reference in New Issue
Block a user