Skip to content

Commit

Permalink
legger til timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Anders Robbestad committed Dec 11, 2020
1 parent 56044d0 commit 7d3657c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/tilstand/moduler/oppgave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createAction, createSlice, PayloadAction } from "@reduxjs/toolkit";
import { RootStateOrAny } from "react-redux";
import { ActionsObservable, ofType, StateObservable } from "redux-observable";
import { of, timer } from "rxjs";
import { catchError, map, retryWhen, switchMap, withLatestFrom } from "rxjs/operators";
import { catchError, map, retryWhen, switchMap, timeout, withLatestFrom } from "rxjs/operators";
import { provIgjenStrategi } from "../../utility/rxUtils";
import { ReactNode } from "react";
import { AjaxCreationMethod } from "rxjs/internal-compatibility";
Expand Down Expand Up @@ -234,6 +234,7 @@ export function hentOppgaverEpos(
let rader = state.oppgaver.rader.slice();
let oppgaveUrl = buildQuery(`/api/ansatte/${action.payload.ident}/oppgaver`, action.payload);
const hentOppgaver = getJSON<RaderMedMetadata>(oppgaveUrl).pipe(
timeout(5000),
map((oppgaver) =>
MOTTATT({
start: action.payload.start,
Expand Down

0 comments on commit 7d3657c

Please sign in to comment.