From 7fc9d3d2df0c941d347707606fe7b3a4ded2f651 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sat, 29 Oct 2022 18:08:32 +1100 Subject: [PATCH] cutter: Transcode and Update checkers should only affect videos for that upload location --- cutter/cutter/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cutter/cutter/main.py b/cutter/cutter/main.py index 5981204..3d83c58 100644 --- a/cutter/cutter/main.py +++ b/cutter/cutter/main.py @@ -656,8 +656,8 @@ class TranscodeChecker(object): result = query(self.conn, """ SELECT id, video_id FROM events - WHERE state = 'TRANSCODING' - """) + WHERE state = 'TRANSCODING' AND upload_backend = %(location)s + """, self.location) return {id: video_id for id, video_id in result.fetchall()} def check_ids(self, ids): @@ -791,11 +791,11 @@ class VideoUpdater(object): built_query = sql.SQL(""" SELECT id, {} FROM events - WHERE state = 'MODIFIED' AND error IS NULL + WHERE state = 'MODIFIED' AND error IS NULL AND upload_backend = %(location)s """).format( sql.SQL(", ").join(sql.Identifier(key) for key in UPDATE_JOB_PARAMS) ) - return list(query(self.conn, built_query)) + return list(query(self.conn, built_query, location=self.location)) def mark_done(self, job, updates): """We don't want to set to DONE if the video has been modified *again* since