]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/job-queue/handlers/activitypub-refresher.ts
Fix unregister default value
[github/Chocobozzz/PeerTube.git] / server / lib / job-queue / handlers / activitypub-refresher.ts
index d97e50ebc4b3acf3a7c9638dab2aa02d168d8181..307e771ffc7312f9b2084473edcb98f53d541fcb 100644 (file)
@@ -1,4 +1,4 @@
-import * as Bull from 'bull'
+import { Job } from 'bullmq'
 import { refreshVideoPlaylistIfNeeded } from '@server/lib/activitypub/playlists'
 import { refreshVideoIfNeeded } from '@server/lib/activitypub/videos'
 import { loadVideoByUrl } from '@server/lib/model-loaders'
@@ -8,10 +8,10 @@ import { ActorModel } from '../../../models/actor/actor'
 import { VideoPlaylistModel } from '../../../models/video/video-playlist'
 import { refreshActorIfNeeded } from '../../activitypub/actors'
 
-async function refreshAPObject (job: Bull.Job) {
+async function refreshAPObject (job: Job) {
   const payload = job.data as RefreshPayload
 
-  logger.info('Processing AP refresher in job %d for %s.', job.id, payload.url)
+  logger.info('Processing AP refresher in job %s for %s.', job.id, payload.url)
 
   if (payload.type === 'video') return refreshVideo(payload.url)
   if (payload.type === 'video-playlist') return refreshVideoPlaylist(payload.url)
@@ -28,7 +28,7 @@ export {
 
 async function refreshVideo (videoUrl: string) {
   const fetchType = 'all' as 'all'
-  const syncParam = { likes: true, dislikes: true, shares: true, comments: true, thumbnail: true }
+  const syncParam = { rates: true, shares: true, comments: true, thumbnail: true }
 
   const videoFromDatabase = await loadVideoByUrl(videoUrl, fetchType)
   if (videoFromDatabase) {