mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
fix(mobile): proper background task cleanup (#28694)
* event-based cancellation wire hash cancellation await cleanup remove forced kill add regression tests abort sync requests fix cleanup ordering in teardown exit isolate test background sync test sigabrt crash cleanup * abort local sync
This commit is contained in:
parent
96d521e149
commit
963862b1b9
29 changed files with 990 additions and 397 deletions
|
|
@ -105,25 +105,26 @@ class CloudIdResult {
|
|||
|
||||
@HostApi()
|
||||
abstract class NativeSyncApi {
|
||||
@async
|
||||
bool shouldFullSync();
|
||||
|
||||
@TaskQueue(type: TaskQueueType.serialBackgroundThread)
|
||||
@async
|
||||
SyncDelta getMediaChanges();
|
||||
|
||||
void checkpointSync();
|
||||
|
||||
void clearSyncCheckpoint();
|
||||
|
||||
@TaskQueue(type: TaskQueueType.serialBackgroundThread)
|
||||
@async
|
||||
List<String> getAssetIdsForAlbum(String albumId);
|
||||
|
||||
@TaskQueue(type: TaskQueueType.serialBackgroundThread)
|
||||
@async
|
||||
List<PlatformAlbum> getAlbums();
|
||||
|
||||
@TaskQueue(type: TaskQueueType.serialBackgroundThread)
|
||||
int getAssetsCountSince(String albumId, int timestamp);
|
||||
|
||||
@TaskQueue(type: TaskQueueType.serialBackgroundThread)
|
||||
@async
|
||||
List<PlatformAsset> getAssetsForAlbum(String albumId, {int? updatedTimeCond});
|
||||
|
||||
@async
|
||||
|
|
@ -132,6 +133,8 @@ abstract class NativeSyncApi {
|
|||
|
||||
void cancelHashing();
|
||||
|
||||
void cancelSync();
|
||||
|
||||
@TaskQueue(type: TaskQueueType.serialBackgroundThread)
|
||||
Map<String, List<PlatformAsset>> getTrashedAssets();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue