mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
fix(server): queueing for duplicate detection (#18380)
* fix queueing * update tests
This commit is contained in:
@@ -8,30 +8,14 @@ select
|
||||
"duplicateId",
|
||||
"stackId",
|
||||
"visibility",
|
||||
"smart_search"."embedding",
|
||||
(
|
||||
select
|
||||
coalesce(json_agg(agg), '[]')
|
||||
from
|
||||
(
|
||||
select
|
||||
"asset_files"."id",
|
||||
"asset_files"."path",
|
||||
"asset_files"."type"
|
||||
from
|
||||
"asset_files"
|
||||
where
|
||||
"asset_files"."assetId" = "assets"."id"
|
||||
and "asset_files"."type" = $1
|
||||
) as agg
|
||||
) as "files"
|
||||
"smart_search"."embedding"
|
||||
from
|
||||
"assets"
|
||||
left join "smart_search" on "assets"."id" = "smart_search"."assetId"
|
||||
where
|
||||
"assets"."id" = $2::uuid
|
||||
"assets"."id" = $1::uuid
|
||||
limit
|
||||
$3
|
||||
$2
|
||||
|
||||
-- AssetJobRepository.getForSidecarWriteJob
|
||||
select
|
||||
@@ -199,18 +183,11 @@ select
|
||||
"assets"."id"
|
||||
from
|
||||
"assets"
|
||||
inner join "smart_search" on "assets"."id" = "smart_search"."assetId"
|
||||
inner join "asset_job_status" as "job_status" on "assetId" = "assets"."id"
|
||||
where
|
||||
"assets"."visibility" != $1
|
||||
and "assets"."deletedAt" is null
|
||||
and "job_status"."previewAt" is not null
|
||||
and not exists (
|
||||
select
|
||||
from
|
||||
"smart_search"
|
||||
where
|
||||
"assetId" = "assets"."id"
|
||||
)
|
||||
and "job_status"."duplicatesDetectedAt" is null
|
||||
|
||||
-- AssetJobRepository.streamForEncodeClip
|
||||
|
||||
Reference in New Issue
Block a user