1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Fix sync import of latest videos

This commit is contained in:
Chocobozzz 2022-09-16 09:37:07 +02:00
parent c95fbe6553
commit 3204f4d17d
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 106 additions and 47 deletions

View file

@ -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()
}
}