mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
always use at-least 5 isolates
This commit is contained in:
parent
e9616a3fbc
commit
425eb2c66e
4 changed files with 12 additions and 9 deletions
|
|
@ -35,7 +35,6 @@ import 'package:immich_mobile/utils/http_ssl_options.dart';
|
|||
import 'package:immich_mobile/wm_executor.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:worker_manager/worker_manager.dart';
|
||||
|
||||
class BackgroundWorkerFgService {
|
||||
final BackgroundWorkerFgHostApi _foregroundHostApi;
|
||||
|
|
@ -94,7 +93,7 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi {
|
|||
await Future.wait(
|
||||
[
|
||||
loadTranslations(),
|
||||
workerManagerForIos.init(dynamicSpawning: true),
|
||||
workerManagerPatch.init(dynamicSpawning: true),
|
||||
_ref?.read(authServiceProvider).setOpenApiServiceEndpoint(),
|
||||
// Initialize the file downloader
|
||||
FileDownloader().configure(
|
||||
|
|
@ -199,7 +198,7 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi {
|
|||
_cancellationToken.cancel();
|
||||
_logger.info("Cleaning up background worker");
|
||||
final cleanupFutures = [
|
||||
workerManagerForIos.dispose().catchError((_) async {
|
||||
workerManagerPatch.dispose().catchError((_) async {
|
||||
// Discard any errors on the dispose call
|
||||
return;
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue