mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
catch sync reading progress query error
This commit is contained in:
parent
fc5b152c43
commit
a580fd7ebf
2 changed files with 7 additions and 3 deletions
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Reference in a new issue