mirror of
https://github.com/immich-app/immich.git
synced 2025-11-28 01:05:17 -05:00
chore: update drift (#23877)
* chore: update drift * update drift dep --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
7134dd29ca
commit
c086a65fa8
@ -177,6 +177,12 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi {
|
||||
}
|
||||
|
||||
Future<void> _cleanup() async {
|
||||
await runZonedGuarded(_handleCleanup, (error, stack) {
|
||||
dPrint(() => "Error during background worker cleanup: $error, $stack");
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _handleCleanup() async {
|
||||
// If ref is null, it means the service was never initialized properly
|
||||
if (_isCleanedUp || _ref == null) {
|
||||
return;
|
||||
@ -186,11 +192,16 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi {
|
||||
_isCleanedUp = true;
|
||||
final backgroundSyncManager = _ref?.read(backgroundSyncProvider);
|
||||
final nativeSyncApi = _ref?.read(nativeSyncApiProvider);
|
||||
|
||||
await _drift.close();
|
||||
await _driftLogger.close();
|
||||
|
||||
_ref?.dispose();
|
||||
_ref = null;
|
||||
|
||||
_cancellationToken.cancel();
|
||||
_logger.info("Cleaning up background worker");
|
||||
|
||||
final cleanupFutures = [
|
||||
nativeSyncApi?.cancelHashing(),
|
||||
workerManagerPatch.dispose().catchError((_) async {
|
||||
@ -199,8 +210,7 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi {
|
||||
}),
|
||||
LogService.I.dispose(),
|
||||
Store.dispose(),
|
||||
_drift.close(),
|
||||
_driftLogger.close(),
|
||||
|
||||
backgroundSyncManager?.cancel(),
|
||||
];
|
||||
|
||||
|
||||
@ -452,10 +452,11 @@ packages:
|
||||
drift:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: drift
|
||||
sha256: "14a61af39d4584faf1d73b5b35e4b758a43008cf4c0fdb0576ec8e7032c0d9a5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
path: drift
|
||||
ref: "53ef7e9f19fe8f68416251760b4b99fe43f1c575"
|
||||
resolved-ref: "53ef7e9f19fe8f68416251760b4b99fe43f1c575"
|
||||
url: "https://github.com/immich-app/drift"
|
||||
source: git
|
||||
version: "2.26.0"
|
||||
drift_dev:
|
||||
dependency: "direct dev"
|
||||
|
||||
@ -113,6 +113,13 @@ dev_dependencies:
|
||||
riverpod_generator: ^2.6.1
|
||||
riverpod_lint: ^2.6.1
|
||||
|
||||
dependency_overrides:
|
||||
drift:
|
||||
git:
|
||||
url: https://github.com/immich-app/drift
|
||||
ref: '53ef7e9f19fe8f68416251760b4b99fe43f1c575'
|
||||
path: drift/
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
assets:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user