mirror of
https://github.com/immich-app/immich.git
synced 2025-12-30 09:15:28 +03:00
fix: local sync task never runs on iOS (#21491)
* fix: local sync task never runs on iOS * chore: rename ios register method * refactor from using dart callback to dart entrypoint + more logs * check if file exists before hashing * reschedule local sync task * chore: rename background worker logger * refactor: move file exists check inside repo --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -16,6 +16,13 @@ class StorageRepository {
|
||||
file = await entity?.originFile;
|
||||
if (file == null) {
|
||||
log.warning("Cannot get file for asset $assetId");
|
||||
return null;
|
||||
}
|
||||
|
||||
final exists = await file.exists();
|
||||
if (!exists) {
|
||||
log.warning("File for asset $assetId does not exist");
|
||||
return null;
|
||||
}
|
||||
} catch (error, stackTrace) {
|
||||
log.warning("Error getting file for asset $assetId", error, stackTrace);
|
||||
@@ -34,6 +41,13 @@ class StorageRepository {
|
||||
log.warning(
|
||||
"Cannot get motion file for asset ${asset.id}, name: ${asset.name}, created on: ${asset.createdAt}",
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
final exists = await file.exists();
|
||||
if (!exists) {
|
||||
log.warning("Motion file for asset ${asset.id} does not exist");
|
||||
return null;
|
||||
}
|
||||
} catch (error, stackTrace) {
|
||||
log.warning(
|
||||
|
||||
Reference in New Issue
Block a user