1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-30 08:10:34 +01:00

[PM-6426] Adjusting how we register the fullSync scheduled task

This commit is contained in:
Cesar Gonzalez 2024-04-17 13:32:56 -05:00
parent 061e622875
commit 8fdc9df4a7
No known key found for this signature in database
GPG Key ID: 3381A5457F8CCECF

View File

@ -448,6 +448,9 @@ export default class MainBackground {
this.logService,
this.stateProvider,
);
this.taskSchedulerService.registerTaskHandler(ScheduledTaskNames.scheduleNextSyncInterval, () =>
this.fullSync(),
);
this.environmentService = new BrowserEnvironmentService(
this.logService,
this.stateProvider,
@ -1098,10 +1101,6 @@ export default class MainBackground {
}
await this.fullSync(true);
this.taskSchedulerService.registerTaskHandler(
ScheduledTaskNames.scheduleNextSyncInterval,
() => this.fullSync(),
);
await this.taskSchedulerService.setInterval(
ScheduledTaskNames.scheduleNextSyncInterval,
5 * 60 * 1000, // check every 5 minutes