aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/pod/pod.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-07 18:26:12 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-07 18:26:12 +0200
commitad0997adfb9e1e3b1ff54338d7558cf7b18440ea (patch)
tree78ef53699d260e194bbcda7eccb645a14070679a /server/models/pod/pod.ts
parent709756b8e183f67ef9bf8f7bc149af4736260350 (diff)
downloadPeerTube-ad0997adfb9e1e3b1ff54338d7558cf7b18440ea.tar.gz
PeerTube-ad0997adfb9e1e3b1ff54338d7558cf7b18440ea.tar.zst
PeerTube-ad0997adfb9e1e3b1ff54338d7558cf7b18440ea.zip
Fix error logging
Diffstat (limited to 'server/models/pod/pod.ts')
-rw-r--r--server/models/pod/pod.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/pod/pod.ts b/server/models/pod/pod.ts
index 9209380fc..62d9e3c6c 100644
--- a/server/models/pod/pod.ts
+++ b/server/models/pod/pod.ts
@@ -216,7 +216,7 @@ updatePodsScore = function (goodPods: number[], badPods: number[]) {
216 216
217 if (goodPods.length !== 0) { 217 if (goodPods.length !== 0) {
218 incrementScores(goodPods, PODS_SCORE.BONUS).catch(err => { 218 incrementScores(goodPods, PODS_SCORE.BONUS).catch(err => {
219 logger.error('Cannot increment scores of good pods.', { error: err }) 219 logger.error('Cannot increment scores of good pods.', err)
220 }) 220 })
221 } 221 }
222 222
@@ -224,7 +224,7 @@ updatePodsScore = function (goodPods: number[], badPods: number[]) {
224 incrementScores(badPods, PODS_SCORE.MALUS) 224 incrementScores(badPods, PODS_SCORE.MALUS)
225 .then(() => removeBadPods()) 225 .then(() => removeBadPods())
226 .catch(err => { 226 .catch(err => {
227 if (err) logger.error('Cannot decrement scores of bad pods.', { error: err }) 227 if (err) logger.error('Cannot decrement scores of bad pods.', err)
228 }) 228 })
229 } 229 }
230} 230}
@@ -246,6 +246,6 @@ function removeBadPods () {
246 } 246 }
247 }) 247 })
248 .catch(err => { 248 .catch(err => {
249 logger.error('Cannot remove bad pods.', { error: err }) 249 logger.error('Cannot remove bad pods.', err)
250 }) 250 })
251} 251}