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:
parent
c95fbe6553
commit
3204f4d17d
5 changed files with 106 additions and 47 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue