mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-18 02:41:15 +02:00
[PM-6426] Adjusting how we register the fullSync scheduled task
This commit is contained in:
parent
061e622875
commit
8fdc9df4a7
@ -448,6 +448,9 @@ export default class MainBackground {
|
|||||||
this.logService,
|
this.logService,
|
||||||
this.stateProvider,
|
this.stateProvider,
|
||||||
);
|
);
|
||||||
|
this.taskSchedulerService.registerTaskHandler(ScheduledTaskNames.scheduleNextSyncInterval, () =>
|
||||||
|
this.fullSync(),
|
||||||
|
);
|
||||||
this.environmentService = new BrowserEnvironmentService(
|
this.environmentService = new BrowserEnvironmentService(
|
||||||
this.logService,
|
this.logService,
|
||||||
this.stateProvider,
|
this.stateProvider,
|
||||||
@ -1098,10 +1101,6 @@ export default class MainBackground {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await this.fullSync(true);
|
await this.fullSync(true);
|
||||||
this.taskSchedulerService.registerTaskHandler(
|
|
||||||
ScheduledTaskNames.scheduleNextSyncInterval,
|
|
||||||
() => this.fullSync(),
|
|
||||||
);
|
|
||||||
await this.taskSchedulerService.setInterval(
|
await this.taskSchedulerService.setInterval(
|
||||||
ScheduledTaskNames.scheduleNextSyncInterval,
|
ScheduledTaskNames.scheduleNextSyncInterval,
|
||||||
5 * 60 * 1000, // check every 5 minutes
|
5 * 60 * 1000, // check every 5 minutes
|
||||||
|
Loading…
Reference in New Issue
Block a user