We've been keen to try this for a while as it means we can remove redis as a
dependency, which makes Immich easier to setup and run.
This replaces bullmq with a bespoke postgres queue. Jobs in the queue are
processed either immediately via triggers and notifications, or eventually if a
notification is missed.
* chore(server): don't insert embeddings if the model has changed
We're moving away from the heuristic of waiting for queues to complete. The job
which inserts embeddings can simply check if the model has changed before
inserting, rather than attempting to lock the queue.
* more robust dim size update
* use check constraint
* index command cleanup
* add create statement
* update medium test, create appropriate extension
* new line
* set dimension size when running on all assets
* why does it want braces smh
* take 2
---------
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
* remove face, person and face search entities
update tests and mappers
check if face relation exists
update sql
unused imports
* pr feedback
generate sql, remove unused imports
* feat(server): Avoid face matching with people born after file creation date (#4743)
* lint
* add medium tests for facial recognition
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(server): extract full-size previews from RAW images
* feat(web): load fullsize preview for RAW images when zoomed in
* refactor: tweaks for code review
* refactor: rename "converted" preview/assets to "fullsize"
* feat(web/server): fullsize preview for non-web-friendly images
* feat: tweaks for code review
* feat(server): require ASSET_DOWNLOAD premission for fullsize previews
* test: fix types and interfaces
* chore: gen open-api
* feat(server): keep only essential exif in fullsize preview
* chore: regen openapi
* test: revert unnecessary timeout
* feat: move full-size preview config to standalone entry
* feat(i18n): update en texts
* fix: don't return fullsizePath when disabled
* test: full-size previews
* test(web): full-size previews
* chore: make open-api
* feat(server): redirect to preview/original URL when fullsize thumbnail not available
* fix(server): delete fullsize preview image on thumbnail regen after fullsize preview turned off
* refactor(server): AssetRepository.deleteFiles with Kysely
* fix(server): type of MediaRepository.writeExif
* minor simplification
* minor styling changes and condensed wording
* simplify
* chore: reuild open-api
* test(server): fix media.service tests
* test(web): fix photo-viewer test
* fix(server): use fullsize image when requested
* fix file path extension
* formatting
* use fullsize when zooming back out or when "display original photos" is enabled
* simplify condition
---------
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
we can't run specifically the handleUserDeleteCheck tests concurrently due to one of the tests modifying the config in the shared database
if run concurrently you can get race conditions where the other tests pick up the change, even with resetting the config in the beforeEach
therefore the test that checks a delete actually happens, fails
there are many ways to solve this, disabling concurrency for the suite, forcing sequential tests for just handleUserDeleteCheck, increasing the delete test deletedAt to more than the custom duration tests deleteDelay
I applied all three of these. You could also force all the user tests to run in their own databases, but that feels overkill
* fix(server) optimize number of sql calls for GET /api/albums
remove unnecessary join for getMetadataForIds
remove separate call to getLastUpdatedAssetForAlbumId
* fix(server) remove unnecessary getLastUpdatedAssetForAlbumId call for GET /api/album/:id
also remove getLastUpdatedAssetForAlbumId query as it is no longer referenced
* fix(server): correct lastModifiedAssetTimestamp return type + formatting and typing
* chore(server): address type issue with tests found via npm:check
tests & lint still pass before this commit.