mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
ui: concatObValues + comments
This commit is contained in:
committed by
Aiden McClelland
parent
8ce43d808e
commit
397236c68e
@@ -15,9 +15,6 @@ export class SyncDaemon {
|
||||
private readonly syncInterval = 5000
|
||||
private readonly $sync$ = new BehaviorSubject(false)
|
||||
|
||||
// emits on every successful sync
|
||||
private readonly $synced$ = new Subject<void>()
|
||||
|
||||
constructor (
|
||||
private readonly apiService: ApiService,
|
||||
private readonly serverModel: ServerModel,
|
||||
@@ -39,15 +36,10 @@ export class SyncDaemon {
|
||||
return from(this.getServerAndApps()).pipe(
|
||||
concatMap(() => this.syncNotifier.handleSpecial(this.serverModel.peek())),
|
||||
concatMap(() => this.startupAlertsNotifier.runChecks(this.serverModel.peek())),
|
||||
tap(() => this.$synced$.next()),
|
||||
catchError(e => of(console.error(`Exception in sync service`, e))),
|
||||
)
|
||||
}
|
||||
|
||||
watchSynced (): Observable<void> {
|
||||
return this.$synced$.asObservable()
|
||||
}
|
||||
|
||||
private async getServerAndApps (): Promise<void> {
|
||||
const now = new Date()
|
||||
const [serverRes, appsRes] = await tryAll([
|
||||
|
||||
Reference in New Issue
Block a user