|
|
@ -656,8 +656,8 @@ class TranscodeChecker(object):
|
|
|
|
result = query(self.conn, """
|
|
|
|
result = query(self.conn, """
|
|
|
|
SELECT id, video_id
|
|
|
|
SELECT id, video_id
|
|
|
|
FROM events
|
|
|
|
FROM events
|
|
|
|
WHERE state = 'TRANSCODING' AND upload_backend = %(location)s
|
|
|
|
WHERE state = 'TRANSCODING' AND upload_location = %(location)s
|
|
|
|
""", self.location)
|
|
|
|
""", location=self.location)
|
|
|
|
return {id: video_id for id, video_id in result.fetchall()}
|
|
|
|
return {id: video_id for id, video_id in result.fetchall()}
|
|
|
|
|
|
|
|
|
|
|
|
def check_ids(self, ids):
|
|
|
|
def check_ids(self, ids):
|
|
|
@ -791,7 +791,7 @@ class VideoUpdater(object):
|
|
|
|
built_query = sql.SQL("""
|
|
|
|
built_query = sql.SQL("""
|
|
|
|
SELECT id, {}
|
|
|
|
SELECT id, {}
|
|
|
|
FROM events
|
|
|
|
FROM events
|
|
|
|
WHERE state = 'MODIFIED' AND error IS NULL AND upload_backend = %(location)s
|
|
|
|
WHERE state = 'MODIFIED' AND error IS NULL AND upload_location = %(location)s
|
|
|
|
""").format(
|
|
|
|
""").format(
|
|
|
|
sql.SQL(", ").join(sql.Identifier(key) for key in UPDATE_JOB_PARAMS)
|
|
|
|
sql.SQL(", ").join(sql.Identifier(key) for key in UPDATE_JOB_PARAMS)
|
|
|
|
)
|
|
|
|
)
|
|
|
|