change TAxios api call method LIFO -> FIFO
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
import axios from "axios";
|
||||
|
||||
import Spotlight from "@enact/spotlight";
|
||||
|
||||
import { types } from "../actions/actionTypes";
|
||||
import {
|
||||
changeAppStatus,
|
||||
changeLocalSettings,
|
||||
setShowPopup,
|
||||
setSystemNotice,
|
||||
setSystemTermination,
|
||||
@@ -14,11 +9,11 @@ import {
|
||||
getAuthenticationCode,
|
||||
getReAuthenticationCode,
|
||||
} from "../actions/deviceActions";
|
||||
import { pushPanel } from "../actions/panelActions";
|
||||
import * as Config from "../utils/Config";
|
||||
import { ACTIVE_POPUP } from "../utils/Config";
|
||||
import * as HelperMethods from "../utils/helperMethods";
|
||||
import { getUrl, URLS } from "./apiConfig";
|
||||
import { pushPanel } from "../actions/panelActions";
|
||||
import * as Config from "../utils/Config";
|
||||
|
||||
let tokenRefreshing = false;
|
||||
const axiosQueue = [];
|
||||
@@ -30,7 +25,7 @@ export const setTokenRefreshing = (value) => {
|
||||
export const runDelayedAction = (dispatch, getState) => {
|
||||
console.log("runDelayedAction axiosQueue size", axiosQueue.length);
|
||||
while (axiosQueue.length > 0) {
|
||||
const requestConfig = axiosQueue.pop(); // queue에서 요청을 하나씩 pop
|
||||
const requestConfig = axiosQueue.shift(); // queue에서 요청을 하나씩 shift
|
||||
TAxios(
|
||||
dispatch,
|
||||
getState,
|
||||
|
||||
Reference in New Issue
Block a user