@@ -9,6 +9,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
9
9
10
10
import 'package:immich_mobile/constants/constants.dart' ;
11
11
import 'package:immich_mobile/services/upload.service.dart' ;
12
+ import 'package:logging/logging.dart' ;
12
13
13
14
class EnqueueStatus {
14
15
final int enqueueCount;
@@ -213,6 +214,7 @@ class DriftBackupNotifier extends StateNotifier<DriftBackupState> {
213
214
final UploadService _uploadService;
214
215
StreamSubscription <TaskStatusUpdate >? _statusSubscription;
215
216
StreamSubscription <TaskProgressUpdate >? _progressSubscription;
217
+ final _logger = Logger ("DriftBackupNotifier" );
216
218
217
219
/// Remove upload item from state
218
220
void _removeUploadItem (String taskId) {
@@ -333,17 +335,17 @@ class DriftBackupNotifier extends StateNotifier<DriftBackupState> {
333
335
}
334
336
335
337
Future <void > handleBackupResume (String userId) async {
336
- debugPrint ( "handleBackupResume " );
338
+ _logger. info ( "Resuming backup tasks... " );
337
339
final tasks = await _uploadService.getActiveTasks (kBackupGroup);
338
- debugPrint ("Found ${tasks .length } tasks" );
340
+ _logger. info ("Found ${tasks .length } tasks" );
339
341
340
342
if (tasks.isEmpty) {
341
343
// Start a new backup queue
342
- debugPrint ("Start a new backup queue" );
344
+ _logger. info ("Start a new backup queue" );
343
345
await startBackup (userId);
344
346
}
345
347
346
- debugPrint ("Tasks to resume: ${tasks .length }" );
348
+ _logger. info ("Tasks to resume: ${tasks .length }" );
347
349
await _uploadService.resumeBackup ();
348
350
}
349
351
0 commit comments