mirror-immich/mobile/lib/domain/services
Santo Shakil 429e181c8f
fix(mobile): run iOS bg task phases in parallel (#28293)
onIosUpload runs sync local, sync remote, hash and handle backup
sequentially. on the bg refresh task path that's a 20s budget from
iOS, and sync + hash usually eat all of it before backup gets a turn
to enqueue any candidates.

these phases don't actually depend on each other. local + remote sync
touch different tables. hash works off whatever's already in drift.
handle backup reads candidates and just enqueues to URLSession bg.
anything one phase produces in this fire shows up to the others on
the next fire, and server-side dedup catches the rare race where
backup enqueues something sync remote was about to mark as already
uploaded.

so this runs all four concurrently via Future.wait, with hash getting
the full maxSeconds-1 budget instead of a fixed 5s. outer budget
timeout still caps everything before iOS expires.

second small change: getAssetsToHash orders by createdAt DESC instead
of id ASC to match getCandidates. when hash runs inside a refresh
fire it processes recent photos first.
2026-06-03 20:13:52 -05:00
..
asset.service.dart chore: upgrade flutter to 3.44.0 (#28537) 2026-05-27 11:14:44 -05:00
background_worker.service.dart fix(mobile): run iOS bg task phases in parallel (#28293) 2026-06-03 20:13:52 -05:00
hash.service.dart fix(mobile): proper background task cleanup (#28694) 2026-06-03 08:16:19 -04:00
local_album.service.dart feat: album info sync (#21103) 2025-09-04 18:44:10 +00:00
local_sync.service.dart fix(mobile): proper background task cleanup (#28694) 2026-06-03 08:16:19 -04:00
log.service.dart fix(mobile): proper background task cleanup (#28694) 2026-06-03 08:16:19 -04:00
map.service.dart chore: upgrade flutter to 3.44.0 (#28537) 2026-05-27 11:14:44 -05:00
memory.service.dart fix(mobile): deep links when using the beta timeline (#20111) 2025-07-25 17:02:49 +00:00
partner.service.dart chore(mobile): add `debugPrint` lint rule (#21872) 2025-09-12 18:56:00 -04:00
people.service.dart feat: add people deeplink (#25686) 2026-02-13 09:13:04 +05:30
remote_album.service.dart fix(mobile): clear album description sends null instead of empty string (#28817) 2026-06-03 18:22:19 -04:00
search.service.dart refactor: folder page to use new models (#27657) 2026-04-13 12:19:44 -05:00
setting.service.dart chore: upgrade flutter to 3.44.0 (#28537) 2026-05-27 11:14:44 -05:00
store.service.dart fix(mobile): proper background task cleanup (#28694) 2026-06-03 08:16:19 -04:00
sync_linked_album.service.dart fix(mobile): proper background task cleanup (#28694) 2026-06-03 08:16:19 -04:00
sync_stream.service.dart fix(mobile): proper background task cleanup (#28694) 2026-06-03 08:16:19 -04:00
tag.service.dart feat(mobile): "Add Tags" asset multiselect option (#26269) 2026-05-18 20:29:09 +05:30
timeline.service.dart refactor: rename metadata to settings (#28691) 2026-05-30 10:27:55 -05:00
user.service.dart chore: upgrade flutter to 3.44.0 (#28537) 2026-05-27 11:14:44 -05:00