diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 8 | ||||
-rw-r--r-- | server/lib/views/shared/video-viewer-stats.ts | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index 167b7b168..d3776c3bf 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts | |||
@@ -106,6 +106,8 @@ const jobTypes: JobType[] = [ | |||
106 | 'video-studio-edition' | 106 | 'video-studio-edition' |
107 | ] | 107 | ] |
108 | 108 | ||
109 | const silentFailure = new Set<JobType>([ 'activitypub-http-unicast' ]) | ||
110 | |||
109 | class JobQueue { | 111 | class JobQueue { |
110 | 112 | ||
111 | private static instance: JobQueue | 113 | private static instance: JobQueue |
@@ -152,7 +154,11 @@ class JobQueue { | |||
152 | .catch(err => logger.error('Error in job queue processor %s.', handlerName, { err })) | 154 | .catch(err => logger.error('Error in job queue processor %s.', handlerName, { err })) |
153 | 155 | ||
154 | queue.on('failed', (job, err) => { | 156 | queue.on('failed', (job, err) => { |
155 | logger.error('Cannot execute job %d in queue %s.', job.id, handlerName, { payload: job.data, err }) | 157 | const logLevel = silentFailure.has(handlerName) |
158 | ? 'debug' | ||
159 | : 'error' | ||
160 | |||
161 | logger.log(logLevel, 'Cannot execute job %d in queue %s.', job.id, handlerName, { payload: job.data, err }) | ||
156 | }) | 162 | }) |
157 | 163 | ||
158 | queue.on('error', err => { | 164 | queue.on('error', err => { |
diff --git a/server/lib/views/shared/video-viewer-stats.ts b/server/lib/views/shared/video-viewer-stats.ts index fd66fd5c7..a9ba25b47 100644 --- a/server/lib/views/shared/video-viewer-stats.ts +++ b/server/lib/views/shared/video-viewer-stats.ts | |||
@@ -136,6 +136,7 @@ export class VideoViewerStats { | |||
136 | try { | 136 | try { |
137 | await sequelizeTypescript.transaction(async t => { | 137 | await sequelizeTypescript.transaction(async t => { |
138 | const video = await VideoModel.load(stats.videoId, t) | 138 | const video = await VideoModel.load(stats.videoId, t) |
139 | if (!video) return | ||
139 | 140 | ||
140 | const statsModel = await this.saveViewerStats(video, stats, t) | 141 | const statsModel = await this.saveViewerStats(video, stats, t) |
141 | 142 | ||