Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

improve background task scheduling check logging

Prateek Sunal417d2e1265e8
diff --git a/mobile/apps/photos/lib/utils/bg_task_utils.dart b/mobile/apps/photos/lib/utils/bg_task_utils.dart
index 86e15c2af1..2602f962c4 100644
--- a/mobile/apps/photos/lib/utils/bg_task_utils.dart
+++ b/mobile/apps/photos/lib/utils/bg_task_utils.dart
@@ -104,9 +104,11 @@ class BgTaskUtils {
if (Platform.isAndroid) {
final isScheduled = await workmanager.Workmanager()
.isScheduledByUniqueName(backgroundTaskIdentifier);
- $.info(
- "Periodic task scheduled status: $isScheduled for $backgroundTaskIdentifier",
- );
+ if (!isScheduled) {
+ $.warning(
+ "Background task is not scheduled: $backgroundTaskIdentifier",
+ );
+ }
}
} catch (e) {
$.warning("Failed to configure WorkManager: $e");