refactor: simplify background worker (#21558)

* chore: log hash starting

* chore: android - bump the min worker delay

* remove local sync only task and always enqueue background workers

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2025-09-03 20:27:30 +05:30
committed by GitHub
parent 2f1385a236
commit 9d3f10372d
15 changed files with 266 additions and 542 deletions
+2 -9
View File
@@ -13,12 +13,9 @@ import 'package:pigeon/pigeon.dart';
)
@HostApi()
abstract class BackgroundWorkerFgHostApi {
void enableSyncWorker();
void enable();
void enableUploadWorker();
// Disables the background upload service
void disableUploadWorker();
void disable();
}
@HostApi()
@@ -32,10 +29,6 @@ abstract class BackgroundWorkerBgHostApi {
@FlutterApi()
abstract class BackgroundWorkerFlutterApi {
// Android & iOS: Called when the local sync is triggered
@async
void onLocalSync(int? maxSeconds);
// iOS Only: Called when the iOS background upload is triggered
@async
void onIosUpload(bool isRefresh, int? maxSeconds);