]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/schedulers/video-views-buffer-scheduler.ts
Suffix external auth username on conflict
[github/Chocobozzz/PeerTube.git] / server / lib / schedulers / video-views-buffer-scheduler.ts
index c0e72c4615c82913c55d215e0a7f2d33096dc206..244a88b14ce087d92cad187278d201761861857f 100644 (file)
@@ -21,19 +21,19 @@ export class VideoViewsBufferScheduler extends AbstractScheduler {
     const videoIds = await Redis.Instance.listLocalVideosViewed()
     if (videoIds.length === 0) return
 
-    logger.info('Processing local video views buffer.', { videoIds, ...lTags() })
-
     for (const videoId of videoIds) {
       try {
         const views = await Redis.Instance.getLocalVideoViews(videoId)
         await Redis.Instance.deleteLocalVideoViews(videoId)
 
-        const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoId)
+        const video = await VideoModel.loadFull(videoId)
         if (!video) {
           logger.debug('Video %d does not exist anymore, skipping videos view addition.', videoId, lTags())
           continue
         }
 
+        logger.info('Processing local video %s views buffer.', video.uuid, lTags(video.uuid))
+
         // If this is a remote video, the origin instance will send us an update
         await VideoModel.incrementViews(videoId, views)