]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/server/job.model.ts
Move to bullmq
[github/Chocobozzz/PeerTube.git] / shared / models / server / job.model.ts
index 9370cf011caedc0bbda00f887259438585c7e9ff..a924183f2f7a43965a657f6bb11e615b9719efd9 100644 (file)
@@ -1,14 +1,15 @@
 import { ContextType } from '../activitypub/context'
 import { VideoState } from '../videos'
-import { VideoStudioTaskCut } from '../videos/studio'
 import { VideoResolution } from '../videos/file/video-resolution.enum'
+import { VideoStudioTaskCut } from '../videos/studio'
 import { SendEmailOptions } from './emailer.model'
 
-export type JobState = 'active' | 'completed' | 'failed' | 'waiting' | 'delayed' | 'paused'
+export type JobState = 'active' | 'completed' | 'failed' | 'waiting' | 'delayed' | 'paused' | 'waiting-children'
 
 export type JobType =
   | 'activitypub-http-unicast'
   | 'activitypub-http-broadcast'
+  | 'activitypub-http-broadcast-parallel'
   | 'activitypub-http-fetcher'
   | 'activitypub-cleaner'
   | 'activitypub-follow'
@@ -26,8 +27,8 @@ export type JobType =
   | 'video-studio-edition'
 
 export interface Job {
-  id: number
-  state: JobState
+  id: number | string
+  state: JobState | 'unknown'
   type: JobType
   data: any
   priority: number
@@ -125,7 +126,6 @@ export interface HLSTranscodingPayload extends BaseTranscodingPayload {
   copyCodecs: boolean
 
   hasAudio: boolean
-  isPortraitMode?: boolean
 
   autoDeleteWebTorrentIfNeeded: boolean
   isMaxQuality: boolean
@@ -137,8 +137,6 @@ export interface NewWebTorrentResolutionTranscodingPayload extends BaseTranscodi
 
   hasAudio: boolean
   createHLSIfNeeded: boolean
-
-  isPortraitMode?: boolean
 }
 
 export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload {
@@ -160,6 +158,8 @@ export type VideoTranscodingPayload =
 export interface VideoLiveEndingPayload {
   videoId: number
   publishedAt: string
+  liveSessionId: number
+  streamingPlaylistId: number
 
   replayDirectory?: string
 }