From 3204f4d17dec79413a94eae8a71b72e0c7ec7ba5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Sep 2022 09:37:07 +0200 Subject: Fix sync import of latest videos --- server/lib/job-queue/handlers/video-channel-import.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/lib/job-queue') 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' import { VideoChannelModel } from '@server/models/video/video-channel' import { VideoChannelSyncModel } from '@server/models/video/video-channel-sync' import { MChannelSync } from '@server/types/models' -import { VideoChannelImportPayload } from '@shared/models' +import { VideoChannelImportPayload, VideoChannelSyncState } from '@shared/models' export async function processVideoChannelImport (job: Job) { const payload = job.data as VideoChannelImportPayload @@ -42,5 +42,7 @@ export async function processVideoChannelImport (job: Job) { }) } catch (err) { logger.error(`Failed to import channel ${videoChannel.name}`, { err }) + channelSync.state = VideoChannelSyncState.FAILED + await channelSync.save() } } -- cgit v1.2.3