chore: add sync backoff mechanism checks (#2786)

This commit is contained in:
Karol Sójko
2024-01-23 09:04:55 +01:00
committed by GitHub
parent 2757884d10
commit ba236a2f2b
7 changed files with 115 additions and 1 deletions

View File

@@ -145,6 +145,8 @@ import {
IsVaultAdmin,
IsReadonlyVaultMember,
DesignateSurvivor,
SyncBackoffService,
SyncBackoffServiceInterface,
} from '@standardnotes/services'
import { ItemManager } from '../../Services/Items/ItemManager'
import { PayloadManager } from '../../Services/Payloads/PayloadManager'
@@ -1351,6 +1353,10 @@ export class Dependencies {
)
})
this.factory.set(TYPES.SyncBackoffService, () => {
return new SyncBackoffService()
})
this.factory.set(TYPES.SyncService, () => {
return new SyncService(
this.get<ItemManager>(TYPES.ItemManager),
@@ -1369,6 +1375,7 @@ export class Dependencies {
this.get<Logger>(TYPES.Logger),
this.get<WebSocketsService>(TYPES.WebSocketsService),
this.get<SyncFrequencyGuardInterface>(TYPES.SyncFrequencyGuard),
this.get<SyncBackoffServiceInterface>(TYPES.SyncBackoffService),
this.get<InternalEventBus>(TYPES.InternalEventBus),
)
})

View File

@@ -30,6 +30,7 @@ export const TYPES = {
SubscriptionManager: Symbol.for('SubscriptionManager'),
HistoryManager: Symbol.for('HistoryManager'),
SyncFrequencyGuard: Symbol.for('SyncFrequencyGuard'),
SyncBackoffService: Symbol.for('SyncBackoffService'),
SyncService: Symbol.for('SyncService'),
ProtectionService: Symbol.for('ProtectionService'),
UserService: Symbol.for('UserService'),