aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-26 15:54:13 +0200
committerChocobozzz <me@florianbigard.com>2018-03-26 16:04:14 +0200
commitd5b7d9110dd637a7f67ce9e430145314812a8df1 (patch)
treed019ef5fe68b14d7e5ad11953b6c1f4811669ce6 /server/lib/job-queue
parent0dcf9a14be3f8668fe5ee65cf0365d457b4d1499 (diff)
downloadPeerTube-d5b7d9110dd637a7f67ce9e430145314812a8df1.tar.gz
PeerTube-d5b7d9110dd637a7f67ce9e430145314812a8df1.tar.zst
PeerTube-d5b7d9110dd637a7f67ce9e430145314812a8df1.zip
Fix error logging
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r--server/lib/job-queue/job-queue.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts
index 66cced59a..1dc28755e 100644
--- a/server/lib/job-queue/job-queue.ts
+++ b/server/lib/job-queue/job-queue.ts
@@ -53,7 +53,7 @@ class JobQueue {
53 this.jobQueue.setMaxListeners(15) 53 this.jobQueue.setMaxListeners(15)
54 54
55 this.jobQueue.on('error', err => { 55 this.jobQueue.on('error', err => {
56 logger.error('Error in job queue.', err) 56 logger.error('Error in job queue.', { err })
57 process.exit(-1) 57 process.exit(-1)
58 }) 58 })
59 this.jobQueue.watchStuckJobs(5000) 59 this.jobQueue.watchStuckJobs(5000)
@@ -111,7 +111,7 @@ class JobQueue {
111 const now = new Date().getTime() 111 const now = new Date().getTime()
112 kue.Job.rangeByState('complete', 0, -1, 'asc', (err, jobs) => { 112 kue.Job.rangeByState('complete', 0, -1, 'asc', (err, jobs) => {
113 if (err) { 113 if (err) {
114 logger.error('Cannot get jobs when removing old jobs.', err) 114 logger.error('Cannot get jobs when removing old jobs.', { err })
115 return 115 return
116 } 116 }
117 117