fix: prevent database deadlock (eps 2)
This commit is contained in:
@@ -66,8 +66,14 @@ class IsarDatabaseRepository implements IDatabaseRepository {
|
||||
include: {'package:immich_mobile/infrastructure/entities/merged_asset.drift'},
|
||||
)
|
||||
class Drift extends $Drift implements IDatabaseRepository {
|
||||
Drift([QueryExecutor? executor])
|
||||
: super(executor ?? driftDatabase(name: 'immich', native: const DriftNativeOptions(shareAcrossIsolates: true)));
|
||||
Drift({QueryExecutor? executor, bool shareAcrossIsolates = true})
|
||||
: super(
|
||||
executor ??
|
||||
driftDatabase(
|
||||
name: 'immich',
|
||||
native: DriftNativeOptions(shareAcrossIsolates: shareAcrossIsolates),
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
int get schemaVersion => 10;
|
||||
|
||||
@@ -7,9 +7,13 @@ import 'logger_db.repository.drift.dart';
|
||||
|
||||
@DriftDatabase(tables: [LogMessageEntity])
|
||||
class DriftLogger extends $DriftLogger implements IDatabaseRepository {
|
||||
DriftLogger([QueryExecutor? executor])
|
||||
DriftLogger({QueryExecutor? executor, bool shareAcrossIsolates = true})
|
||||
: super(
|
||||
executor ?? driftDatabase(name: 'immich_logs', native: const DriftNativeOptions(shareAcrossIsolates: true)),
|
||||
executor ??
|
||||
driftDatabase(
|
||||
name: 'immich_logs',
|
||||
native: DriftNativeOptions(shareAcrossIsolates: shareAcrossIsolates),
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user