mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Revert SQL optimization in videos list :(
This commit is contained in:
parent
f771466891
commit
18dbb5b972
@ -215,8 +215,8 @@ type AvailableForListOptions = {
|
|||||||
'INNER JOIN "videoChannel" ON "videoChannel"."id" = "video"."channelId" ' +
|
'INNER JOIN "videoChannel" ON "videoChannel"."id" = "video"."channelId" ' +
|
||||||
'INNER JOIN "account" ON "account"."id" = "videoChannel"."accountId" ' +
|
'INNER JOIN "account" ON "account"."id" = "videoChannel"."accountId" ' +
|
||||||
'INNER JOIN "actor" ON "account"."actorId" = "actor"."id" ' +
|
'INNER JOIN "actor" ON "account"."actorId" = "actor"."id" ' +
|
||||||
'WHERE "actor"."serverId" IS NULL OR ' +
|
'LEFT JOIN "actorFollow" ON "actorFollow"."targetActorId" = "actor"."id" ' +
|
||||||
'"actor"."id" IN (SELECT "targetActorId" FROM "actorFollow" WHERE "actorId" = 1)' + // Subquery for optimization
|
'WHERE "actor"."serverId" IS NULL OR "actorFollow"."actorId" = ' + actorIdNumber +
|
||||||
')'
|
')'
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@ -632,7 +632,7 @@ export class VideoModel extends Model<VideoModel> {
|
|||||||
// Do not wait video deletion because we could be in a transaction
|
// Do not wait video deletion because we could be in a transaction
|
||||||
Promise.all(tasks)
|
Promise.all(tasks)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
logger.error('Some errors when removing files of video %s in after destroy hook.', instance.uuid, { err })
|
logger.error('Some errors when removing files of video %s in before destroy hook.', instance.uuid, { err })
|
||||||
})
|
})
|
||||||
|
|
||||||
return undefined
|
return undefined
|
||||||
|
Loading…
Reference in New Issue
Block a user