From 941d28cc7f9877aa2cfcee018413e0f04f0a9048 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 18 May 2022 12:01:02 +0200 Subject: Reduce error logs --- server/lib/job-queue/job-queue.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server/lib/job-queue/job-queue.ts') 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[] = [ 'video-studio-edition' ] +const silentFailure = new Set([ 'activitypub-http-unicast' ]) + class JobQueue { private static instance: JobQueue @@ -152,7 +154,11 @@ class 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 => { -- cgit v1.2.3