- return this.refresh$
- .pipe(
- switchMap((_) =>
- timer(0, 10000).pipe(
- tap((_) => {
- this.loadingSubject.next(true);
- }),
- switchMap((_) => jobs$),
- map((response) => this.extractJobs(prodId, response))
- )
+ const refreshedJobs$ = this.refresh$.pipe(
+ switchMap((_) =>
+ timer(0, 10000).pipe(
+ tap((_) => {
+ this.loadingSubject$.next(true);
+ }),
+ switchMap((_) => jobs$),
+ map((response) => this.extractJobs(prodId, response))