refactor: stream for sidecar (#17995)

* refactor: stream for sidecar

* chore: make sql

---------

Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
Alex 2025-04-30 10:53:51 -05:00 committed by GitHub
parent 436cff72b5
commit 732b06eec8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 46 additions and 38 deletions

View file

@ -470,6 +470,18 @@ from
where
"assets"."deletedAt" <= $1
-- AssetJobRepository.streamForSidecar
select
"assets"."id"
from
"assets"
where
(
"assets"."sidecarPath" = $1
or "assets"."sidecarPath" is null
)
and "assets"."isVisible" = $2
-- AssetJobRepository.streamForDetectFacesJob
select
"assets"."id"

View file

@ -238,18 +238,13 @@ select
from
"assets"
where
(
"assets"."sidecarPath" = $1
or "assets"."sidecarPath" is null
)
and "assets"."isVisible" = $2
and "deletedAt" is null
"deletedAt" is null
order by
"createdAt"
limit
$3
$1
offset
$4
$2
-- AssetRepository.getTimeBuckets
with