Skip to content

Commit f5852d8

Browse files
authored
fix(ui): handle events sequentially (#5877)
1 parent 8e4c7de commit f5852d8

File tree

5 files changed

+247
-238
lines changed

5 files changed

+247
-238
lines changed

ui/src/app/app.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import { Store } from '@ngxs/store';
88
import { EventService } from 'app/event.service';
99
import { GetCDSStatus } from 'app/store/cds.action';
1010
import { CDSState } from 'app/store/cds.state';
11-
import { WebSocketSubject } from 'rxjs/internal-compatibility';
1211
import { interval, of, zip } from 'rxjs';
13-
import { filter, map, mergeMap } from 'rxjs/operators';
12+
import { WebSocketSubject } from 'rxjs/internal-compatibility';
13+
import { concatMap, filter, map, mergeMap } from 'rxjs/operators';
1414
import { Subscription } from 'rxjs/Subscription';
1515
import * as format from 'string-format-obj';
1616
import { AppService } from './app.service';
@@ -183,7 +183,8 @@ export class AppComponent implements OnInit, OnDestroy {
183183

184184
startVersionWorker(): void {
185185
this._ngZone.runOutsideAngular(() => {
186-
this.versionWorkerSubscription = interval(60000).pipe(mergeMap(_ => this._monitoringService.getVersion()))
186+
this.versionWorkerSubscription = interval(60000)
187+
.pipe(concatMap(_ => this._monitoringService.getVersion()))
187188
.subscribe(v => {
188189
this._ngZone.run(() => {
189190
if ((<any>window).cds_version !== v.version) {

0 commit comments

Comments
 (0)