]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/schedule-video-update.ts
Increase max stalled count in job queue
[github/Chocobozzz/PeerTube.git] / server / models / video / schedule-video-update.ts
index 3cf5f6c99b06591fe81260f6479553d348d0eedc..1e56562e1974dae3f4f198036b6719a692796ea8 100644 (file)
@@ -83,6 +83,17 @@ export class ScheduleVideoUpdateModel extends Model<ScheduleVideoUpdateModel> {
     return ScheduleVideoUpdateModel.findAll(query)
   }
 
+  static deleteByVideoId (videoId: number, t: Transaction) {
+    const query = {
+      where: {
+        videoId
+      },
+      transaction: t
+    }
+
+    return ScheduleVideoUpdateModel.destroy(query)
+  }
+
   toFormattedJSON () {
     return {
       updateAt: this.updateAt,