aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-16 09:37:07 +0200
committerChocobozzz <me@florianbigard.com>2022-09-16 09:37:07 +0200
commit3204f4d17dec79413a94eae8a71b72e0c7ec7ba5 (patch)
treeb6f5a2c3d6e55676972e671fb0ef429a7bdd975b /server/lib/job-queue/handlers
parentc95fbe65530191d7be22341815ecb743c139396f (diff)
downloadPeerTube-3204f4d17dec79413a94eae8a71b72e0c7ec7ba5.tar.gz
PeerTube-3204f4d17dec79413a94eae8a71b72e0c7ec7ba5.tar.zst
PeerTube-3204f4d17dec79413a94eae8a71b72e0c7ec7ba5.zip
Fix sync import of latest videos
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r--server/lib/job-queue/handlers/video-channel-import.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/lib/job-queue/handlers/video-channel-import.ts b/server/lib/job-queue/handlers/video-channel-import.ts
index 9aaad659e..600292844 100644
--- a/server/lib/job-queue/handlers/video-channel-import.ts
+++ b/server/lib/job-queue/handlers/video-channel-import.ts
@@ -5,7 +5,7 @@ import { synchronizeChannel } from '@server/lib/sync-channel'
5import { VideoChannelModel } from '@server/models/video/video-channel' 5import { VideoChannelModel } from '@server/models/video/video-channel'
6import { VideoChannelSyncModel } from '@server/models/video/video-channel-sync' 6import { VideoChannelSyncModel } from '@server/models/video/video-channel-sync'
7import { MChannelSync } from '@server/types/models' 7import { MChannelSync } from '@server/types/models'
8import { VideoChannelImportPayload } from '@shared/models' 8import { VideoChannelImportPayload, VideoChannelSyncState } from '@shared/models'
9 9
10export async function processVideoChannelImport (job: Job) { 10export async function processVideoChannelImport (job: Job) {
11 const payload = job.data as VideoChannelImportPayload 11 const payload = job.data as VideoChannelImportPayload
@@ -42,5 +42,7 @@ export async function processVideoChannelImport (job: Job) {
42 }) 42 })
43 } catch (err) { 43 } catch (err) {
44 logger.error(`Failed to import channel ${videoChannel.name}`, { err }) 44 logger.error(`Failed to import channel ${videoChannel.name}`, { err })
45 channelSync.state = VideoChannelSyncState.FAILED
46 await channelSync.save()
45 } 47 }
46} 48}