'video-studio-edition'
]
+const silentFailure = new Set<JobType>([ 'activitypub-http-unicast' ])
+
class JobQueue {
private static instance: JobQueue
.catch(err => logger.error('Error in job queue processor %s.', handlerName, { err }))
queue.on('failed', (job, err) => {
- logger.error('Cannot execute job %d in queue %s.', job.id, handlerName, { payload: job.data, err })
+ const logLevel = silentFailure.has(handlerName)
+ ? 'debug'
+ : 'error'
+
+ logger.log(logLevel, 'Cannot execute job %d in queue %s.', job.id, handlerName, { payload: job.data, err })
})
queue.on('error', err => {
try {
await sequelizeTypescript.transaction(async t => {
const video = await VideoModel.load(stats.videoId, t)
+ if (!video) return
const statsModel = await this.saveViewerStats(video, stats, t)